Setting up SEO-efficient redirection when moving domain, without hosting package at old domain

I am moving a medium sized WordPress site (a few hundred pages) from one domain to another in order to take advantage of a new TLD variant of the name I already have.

Let's say it's moving the site from mydomain.biz to mydomain.co.uk

I want to set up page-by-page redirections from the old site to the new site but don't want to pay for a hosting package just to host a .htaccess file at mydomain.biz with a few hundred lines in it.

My ISP supports website forwarding by domain redirection but I'm not sure how it's implemented (they support 301, 302 and masked)

I set up a 302 domain redirection (for testing purposes) with the ISP from mydomain.biz to a sub-folder at  mydomain.co.uk/redirect and within the redirect folder, I have a .htaccess file that has a single line like this:

Redirect 301 /test-page/ http://mydomain.co.uk/test-page/

Open in new window


I also tried this:

Redirect 301 /redirect/test-page/ http://mydomain.co.uk/test-page/

Open in new window


Now, if I open a browser and go to http://mydomain.biz/test-page/ I want to end up at http://mydomain.co.uk/test-page/

In both the above .htaccess cases, the URL in the browser changes to mydomain.co.uk/redirect/ but I get the "No Results Found" page back from WordPress which says to me the .htaccess part isn't working or my ISP isn't passing the full URL.

Should I be able to get this to work (preferably with a Rewrite rule) and if so, how? Also, is this good SEO practice?
LVL 14
Jamie GarrochPowerPoint Consultant & DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

grahamnonweilerCommented:
Firstly, most ISPs and Domain Name Registrars that offer "redirects" are just that - meaning they redirect all the traffic heading to one domain to another domain. In the process the redirect will strip-off anything after the domain name (be that query string or URL content). So in it is unlikely that will help you achieve what you want.

The correct method to handle what you want, and to keep your ranking in place, is to place a series of redirects under the original domain to handle the various URLs and backlinks you are concerned about. And that will require some form of hosting. Additionally, keep in mind that there should only be one redirect for most search engines to recognise and accept as being a genuine movement/change in domain name.

For example:

      Redirect 301  ?test-page/   http://mynewdomain.com/test-page/

However a more appropriate catch all would b done using rewrite with the "R" flag set (to denote permanent redirect):

      Rewrite ?(.*)$  http//mynewdomain.com/$1 [R,QSA,L,NC]
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jamie GarrochPowerPoint Consultant & DeveloperAuthor Commented:
After some additional testing, it does appear that this is what my ISP is doing Graham:

In the process the redirect will strip-off anything after the domain name

So, thank you for confirming and for the RewriteRule.

Such a shame that I have to now purchase yet another hosting package to host a single .htaccess file :-(
0
Jamie GarrochPowerPoint Consultant & DeveloperAuthor Commented:
By the way, should the rewrite rule include the 301 declaration?

RewriteRule ?(.*)$  http//mynewdomain.com/$1 [R=301,QSA,L,NC]
0
grahamnonweilerCommented:
The 301 is the default for the "R" tag (in most versions of Apache) in the rewrite, so not necessary to add it - but if you find your host has an older version of Apache (or IIS) running then you can it.
0
Jamie GarrochPowerPoint Consultant & DeveloperAuthor Commented:
Ahhhh. Thank you :-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.