Redirect non-www to www with Apache and NGINX

A two minute guide to redirecting all traffic on your website from the bare / naked / apex domain to www.

It is a common requirement for system and website administrators to redirect users to a common entry point for their website — also known as a canonical hostname. This is usually in one of two directions, i.e…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store