0

I recently transferred my site to a new server, and some users' DNS servers have still not been updated. I'd like to provide them an IP address to access my site in the meantime.

I set up an Alias in my 000-default.conf file so that http://(ip address)/alias goes to the home page of my blog, but of course all the links still point to the domain name, so as soon as anyone clicks a link, they are taken to the old server again.

Is there anyway to rewrite these URLs on the fly so that it's possible to browse and use the site while accessing it via an IP address and alias instead of the domain name?

1 Answer 1

1

You should just be able to temporarily change the Wordpress and Site address in the settings page to the IP new address.

However, please note that this is bad practice... and, instead, you should just place a global redirect on your old site for the new IP address - it will cause 2x the traffic for anyone not getting the new DNS, but it will keep things working properly, going forward.

2
  • Hmm, thanks, but I'm just trying to work with a user on a one-off basis. I don't want to change the site address in wordpress, I just want to give this guy a link he can use until his DNS servers are updated. Maybe this isn't possible?
    – intelli78
    Mar 26, 2015 at 23:01
  • It's possible... but generally not great practice. Blunty, Wordpress will redirect clients back to the "name" in either the "wordpress address" or "site address" (off the top of my head, I forget which one "wins" in those settings). Generally, it's best to plan migrations like this well ahead of time, and create something like a "www2" site with a new DNS entry. Once that installation is setup and stable, then you can just do something like change the name on the old site, and fix the DNS entry (though it's often great to have a way to easily get back to the old machine, as well).
    – RVT
    Mar 27, 2015 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.