User Directories Map To Ip Address Not Domain Name

I recently updated my Domain name from my ip address to a domain I purchased on NameCheap. I had previously had user web directories set up and they would map to If it I type in my new domain name it works, but I get a cross-origin No Access Allow Control Origin error in my console. Also, when I click a link it automatically maps to my ip address, not the new domain name. I’m using Wordpress as development. I want my links to map to the Domain Name not the IP Address and I’ve tried adding 'Header set Access-Control-Allow-Origin “*” to my userdir.conf file in Apache2, but no dice(Yes, I’ve restarted apache). Side note, I do not get the error when I’m loading my IP Address and the user web directories as the URL.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

When switching from using the IP address to using your domain did you update the Site URL in your WordPress settings? If not, then WordPress would continue to return links using your IP address and may redirect back to the IP address as well. Log into /wp-admin and change these settings and the issues you’re running into should be resolved.

This comment has been deleted