By djboz
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 myIpAddress.com/~userName/file. 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.
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!
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
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.