Forum Moderators: phranque

Message Too Old, No Replies

URL Redirection Not Redirecting Pages

         

wbdsmith

4:40 am on Sep 26, 2014 (gmt 0)

10+ Year Member



Hi we have recently decided to move
"http://oursite.com"
to
"http://oursite.anotherdomain.com"
to combine multiple business assets. I went to our domain registrar and used their redirection service to point the old domain to the new subdomain.

The problem is that the pages and folders in the old domain do not map, so when I visit:
"http://oursite.com/folder"
and expect to arrive at
"http://oursite.anotherdomain.com/folder" I get 404 errors.

The registrar provided the following solution:
"The url redirection service only redirects "http://www.oursite.com" and "http://oursite.com"

I read about 301 redirects etc. but to me that sounds like I still need active hosting for "http://oursite.com", so the redirection can take place there by means of a htaccess file. Is this correct? It makes sense that we should cancel the existing hosting for "http://oursite.com" and have the domain control panel do the pointing. I am confused...

Any thoughts would be appreciated!

phranque

7:27 pm on Sep 26, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to webmasterworld, wbdsmith!


you could configure multiple virtual hosts on one server and handle the canonical hostname redirect there.

lucy24

7:39 pm on Sep 26, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you really can't get the entire content of oldsite.com to use oldsite.example.com's DNS -- which sounds odd to me-- then yes, you would need to keep the old hosting just to maintain an htaccess file. But you could probably cut back to a cheaper level of hosting, since all you're doing is sending out 301 responses to page requests.

The registrar provided the following solution:
"The url redirection service only redirects "http://www.oursite.com" and "http://oursite.com"

Are the registrar and DNS the same people? It sounds as if you're only getting a supplementary redirect service, nothing to do with where the DNS is pointing. (Yes, it's obviously easier to have registrar-host-DNS all provided by the same people. It's what I do. But some folks feel strongly that it should be handled by three different, unrelated entities.)

The reference to htaccess implies that there's no virtual host involved. But there's no need to use different hosts for the two sites, unless you're simply dissatisfied with the original host for other reasons.

wbdsmith

1:38 am on Sep 28, 2014 (gmt 0)

10+ Year Member



Thanks for the information lucy24 (and phranque).

Lucy24 in your first sentence do you mean that I should be able to use DNS records to point the old domain to the subdomain, and have everything work properly, instead of using the host's redirection service? Sorry I am a beginner in matters of DNS.

The registrar hosts the URL Redirection and some Managed DNS Services:
- IP pointing
- MX pointing
- CNAME pointing

but I have not made any changes there. Should I be? I guess I felt the URL redirection option was most suitable.

I have signed up today to Zonomi and have pointed my oldsite.com DNS Nameservers to Zonomi's nameservers, so that I can fiddle with records and have them update quickly in case of errors.

I hope Im on the right track.

lucy24

6:05 am on Sep 28, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Backtracking here...

It is possible to have multiple hostnames all pointing to the same physical files, so one user's example.be is another user's example.nz. But whether you'd want to do this is a whole nother question, best raised in one of the SEO-oriented subforums. The issue of Duplicate Content rears its head.

If it were me, with two or more domain names and a single set of identical files, I'd redirect page-for-page instead. Admittedly you don't get a lot of humans typing in URLs that are exactly right except for the hostname. But it's just the kind of thing a search engine would try.

If you're redirecting everything, you're looking at a single line in htaccess at the old location, where "old location" means "wherever the DNS for the old hostname now points, whether or not it's physically the same old place". It looks something like

RewriteRule ^(.+) http://www.example.com/$1 [R=301,L]

If old and new hosts live in the same physical location, you'll need a preceding RewriteCond looking at the hostname.

Come to think of it ... If old and new sites live in the same directory on the same server, you may not even need a redirect at all. The standard domain-name-canonicalization redirect might cover everything. The server doesn't care whether the "wrong" name is otherdomain.othername.com or www.example.com:8080; it only knows that the hostname is not example.com.

:: screeching to a halt because I have to deal with cat throwing up in dark hallway before I forget about it and am only reminded by ... oh, never mind ::

wbdsmith

1:14 pm on Sep 28, 2014 (gmt 0)

10+ Year Member



Thanks very much lucy24 I appreciate the long and thoughtful response. I have to take a bit of time to digest this information... Good luck with the vomit.