0

Whenever someone visits www.example.com or https://www.example.com I want to forward visitors to https://example.com

I first thought I can do this in my DNS Records, but DNSimple support said it has to be via 301 redirects. Anyone can help me how to solve this in Django?

  • This is something you would do in your web server, not in Django. – Daniel Roseman Aug 25 '18 at 22:06
  • Hmm okay then I'm confused dnsimple.com (where I am hosting my domain) don't seem to have this kind of 301 redirect. –  Aug 25 '18 at 22:44
  • If you're using Apache, this can be done using .htaccess configuration as explained here https://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www You will probably need to have admin access to the server. You may need to enable rewrites in your apache server first (`AllowOverride all` in your virtual host) – Michal Aug 26 '18 at 00:57

0 Answers0