By Paulo Alves
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 restarted 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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Greetings!
I have seen browsers cache redirects, most specifically Chrome. If you pull up a web browser that you’ve never used to visit that domain, does the redirect still occur?
Break out the old Internet Explorer if you need to for a test, and/or a curl test via command line to see what code is returned when checking the URL (curl -I domainname).
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.