I’m struggling to redirect HTTP requests with AND without a leading ‘www’. Note I want to retain the ‘emandrick.com’ dreamhost domain after redirection, i.e. I want:
http://www.emandrick.com to redirect to heroku backend
http://emandrick.com to redirect to heroku backend (ideally remapping it to http://www.emandrick.com so all the URLs are the same).
Under my Domain management panel, I can setup a CNAME DNS Record for www.emandrick.com and this redirects nicely. However, it won’t let me set up a redirect for emandrick.com on its own, telling me that “CNAME records may only be used on sub-domains.”.
How do I redirect ‘emandrick.com’ as well? Is there another method I should be using?
Any advice appreciated!