Question
Stop redirecting one domain to another
I have a personal personal website to which I have two domains directed to. One of them is the old domain, the other one is the new, proper domain. This is a django website, which I run with Nginx and UWSGI.
I’m in the process of creating another website, and I want to use that old domain to test it. This shall be a wordpress website.
I removed all the rewrite/redirect parameters from Nginx, and also removed the old domain from the server_name
parameter of the Django website, and sudo service nginx restart
ed and restarted UWSGI. I also stopped the A and CNAME records from pointing to the other website (and more than four days have passed since I did it) and updated them to point to themselves. I have two other websites up so I know I didn’t mess up at this part.
So I figure that either I have messed up some config file (although I couldn’t find anything substantial with grep -r) or for some reason Digital Ocean didn’t update the records.
I’ve updated the files in:
/etc/nginx/sites-available/
(which are linked to the ../sites-enabled/
folder.
/etc/uwsgi/sites/
(which is where the the uwsgi init script points to)
/home/user/Websites/djangoapp/djangoapp/settings.py
(updated the “ALLOWED_HOSTS” to no longer allow the old domains)
And they no longer make any mention to the old domain, but this domain keeps redirecting to the new domain. Is there anything I forgot?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×