Welcome to WebmasterWorld Guest from 54.226.22.192

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

redirecting a domain

     
4:09 am on Mar 5, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2002
posts: 1541
votes: 0


We have a domain we wish to redirect to another one. What is is the best way to transfer to pagerank to the other domain?
5:24 am on Mar 5, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10550
votes: 10


301 status code on the response.

one-to-one correspondence between legacy urls and new urls for the redirects.
(no "wildcard" redirects to the home page.)
in other words redirect the old home page only to the new domain and 404/410 all other requests;
or, redirect requests for a specific set of legacy urls to the equivalent urls on the new domain and 404/410 all requests for "junk" urls.
6:45 pm on Mar 5, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2002
posts: 1541
votes: 0


ok, so do I do that in the htaccess file?
7:03 pm on Mar 5, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10550
votes: 10


if you can translate the old urls to the new urls using a translation table or using patterns and well-defined rules with possible exceptions, you can use mod-rewrite directives in the .htaccess file.

if the url translation requires a database lookup then you will need to internally rewrite the old urls to a script that provides the proper response.
the internal rewrite will also require some mod_rewrite code in the .htaccess file.
it will be helpful if you can distinguish old urls from new urls for this internal rewrite.

anything more specific than that requires more information about what your urls look like.
9:28 pm on Mar 5, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2002
posts: 1541
votes: 0


Actually what I want to do is catch any url from this domain, and redirect it to the homepage of the new url.
Is there some catch all redirect?
10:02 pm on Mar 5, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 7, 2003
posts:4783
votes: 0


Actually what I want to do is catch any url from this domain, and redirect it to the homepage of the new url. Is there some catch all redirect?


This raises the question:
Is then there no content on your new domain to satisfy the vistors on the old urls ?

I put it harsh, cause that's also what you'd be doing to visitors that end up on deep links and it's also the signal you send to search engines.
11:09 pm on Mar 5, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:12999
votes: 289


Is there some catch all redirect?

Yes, it's trivial. A single line in htaccess. In some shared-hosting setups you can even do it by clicking a button somewhere in your control panel.

What people are trying to find out is whether you are absolutely positive you want to do this, and are making an informed choice. Eventually we get to the "Awright, just show him how to aim the ### gun" part, but not yet.
12:31 am on Mar 6, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10550
votes: 10


that part where I said "no wildcard redirects to the home page".

you probably don't want to do that to your visitors.
the proper response is a 404 (or 410 if appropriate) status code.
then provide a custom error document that looks similar to your new domain's home page with sufficient navigation and/or search capability for the visitor to find the resource they were expecting when they clicked on the linked to or bookmarked url on the old domain.

if you try to redirect all the pagerank from the old domain the the new domain's home page you will likely lose most or all if it.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members