Redirecting Domain to cPanel user on new WHM

Harlequin

Well-Known Member
Sep 4, 2011
47
1
58
Santa Cruz de Tenerife, Spain
cPanel Access Level
Root Administrator
Twitter
Hi

I've recently moved a number of domains to a new host, well over a week ago now. However, some of my customers are complaining that from some locations they are still seeing the old website.

I've checked the DNS for each and they appear to be OK so I can only assume it's down to their ISP.

One way I was thinking I might get round this was to login to the old WHM accounts and edit the index.php file to redirect to the new site using the IP address. Something like "000.000.000.000/~user" but It's been so long since I've done anything like that I wanted to ask here if there was a better solution...
 

Brian

Well-Known Member
Dec 1, 2010
117
3
68
Texas
cPanel Access Level
Root Administrator
You certainly could redirect to the IP URL of the "new" server, just like you're suggesting. However, remember that accesses to IP URLs are unable to have their bandwidth attributed to the site owner. So, all traffic you redirect in that fashion would essentially be unmetered bandwidth.

If that's not a concern for you, then there's not necessarily a direct problem with using that redirect. However, also be aware that some scripts/sites are not designed to be called from a different directory structure like that. Some sites *will* break and refuse to load because you're loading it from "/~username/" instead of "/".

If this is a problem that's gone on for over a week like you say, though, I'd be hesitant to advise such a bandaid fix like a redirect. You should continue to encourage the affected users to resolve the DNS caching problem with their network equipment and/or contact their ISP as necessary.
 

Harlequin

Well-Known Member
Sep 4, 2011
47
1
58
Santa Cruz de Tenerife, Spain
cPanel Access Level
Root Administrator
Twitter
Thanks for the response. I thought I could do it. However, when I use "http://184.107.169.90/~username/" it changes to "http://www.184.107.169.90/~username/".

It may be becaus ethe sites are running a URL SEF component as they are all Joomla sites now.

I agree with the band aid idea. However, we're dealing with a 3rd world ISP in a 1st world economy here and if I called tech support I doubt they'd know what a DNS server is. It's that brutal.
 

Brian

Well-Known Member
Dec 1, 2010
117
3
68
Texas
cPanel Access Level
Root Administrator
Sounds like you have .htaccess mod_rewrite rules or otherwise setup on the new box that's force rewriting all URLs to prefix with www.

You'd need to identify what's doing that and turn it off or adapt an exception to allow an IP URL. Since it could be any amounts of possible causes (.htaccess rewite, Joomla plugin, etc.) I really wouldn't have a solid recommendation to start with. But, it would be something like that.