Redirection Problem
-
Wondering if anyone could offer some tips here please. I cannot share the site name so will try and be as detailed as possible.
My client had their site on a .com domain and have decided to move to a co.uk domain. The new site has been put on the uk domain with more or less the same structure, save for pages which have been removed or merged.
I am now setting up 301 redirects to tell the engines about the moved site, however this is giving me no end of grief. I can get domain.com to redirect to domain.co.uk no problems, however, if I try and redirect any of the inner pages to their new locations they all end up on the .co.uk home not where they should be. Given the homepage isn't designed to rank for all the terms.
The htaccess I am using is below, I cannot see anything wrong with it, can anyone else?
Redirect 301 / http://newdomain.co.uk/
Redirect 301 /villa_rental.php http://newdomain.co.uk/villa_rental.html
Redirect 301 /new_home.php http://newdomain.co.uk/new_home.html
Redirect 301 /http://newdomain.com/villas.php http://newdomain.co.uk/villastyles.html
Redirect 301 /developments.php http://newdomain.co.uk/developments.html
Redirect 301 /solana_hills.php http://newdomain.co.uk/solana_hills.html
Redirect 301 /middle_east.php http://newdomain.co.uk/middle_east.html
Redirect 301 /denia.php http://newdomain.co.uk/denia.html
Redirect 301 /faq.php http://newdomain.co.uk/faq.htmlI have tried both relative and full paths for the old site but doesn't make any difference. Does it matter the old site is php and the new html?
many thanks
-
Hi Carl,
You should be able to do this with one rule:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) [newdomain.co.uk] [R=301,L]Give this a shot and see if it works. It should direct http://www.olddomain.com/villa_rental.php to www.newdomain.com/villa_rental.php and so forth.
Cheers,
Jane
-
May be totally wrong here, but it is a quick test...
Switch the order of your redirects. First list all the old specific page to new specific page rules. Then last in the list put this rule - Redirect 301 / http://newdomain.co.uk/ (which you currently have first). That may let most of the specific pages do their thing before that general rule sends whatever is left to the homepage.
The way you code your htaccess is a bit different from what I do. Mine has a lot more code for each rule, and some qualifiers like L and NE...
Let us know if it works?
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
New ecommerce site: Close old site and full domain redirect or keep it linking to new site?
We have rebranded and are working on our new site (B). Our old site (A) has a much higher domain/page authority than our new site. Currently we have the original Site A still there, with all links/pages pointing to the new Site B when people click. I am unsure whether we'd be best to close down the Site A completely and do a full domain redirect to Site B. Site A: 10 years age and has a moderate amount of links to it.
Web Design | | ModowestNZ
Homepage - PA: 24 DA:11 Site B: 6 months age, few links
Homepage - PA: 1 DA:2 My concern with the full domain redirect is that the indexed/ranking pages would dissapear. The benefit is less brand confusion for our niche range of party accessories.0 -
Looking to remove SSL because it is causing very slow website download speeds. Does WP have a plugin that redirects SSL urls to non SSL urls?
After some extended debate with our web development team we are considering dropping the SSL from our website because it is adding almost 2 additional seconds to our download speeds. We know there is a SEO boost from having a SSL but we believe the extended download speeds maybe outweighing the benefit. However we are concerned about the SEO implications of having no method possible of redirect SSL to non SSL webpages. Does anybody know of a Wordpress Plugin that can force redirect SSL urls to non SSL urls?
Web Design | | RosemaryB0 -
I want to create a 301 redirect on a WordPress site, nothing's working...
Hello all, I'm hoping someone out there can give me a hand with this. I'm trying to modify my .htaccess file so that the site will go from maxcarnagemusic.com to www.maxcarnagemusic.com and also, so viewers will be redirected to www.maxcarnagemusic.com/home when they try to access the site. I've tried a few different things, including adding the 301 redirect plugin for Wordpress, but nothing seems to work. Can someone out there show/tell me how to create an htaccess file that will execute as much. I apologize in advance, my Apache experience is very, very limited. Thank you all in advance!
Web Design | | maxcarnage0 -
Should I Kill the Old Domain or Work Through the Redirect?
Our IT department wasn't able to create a new directory on the current domain name for whatever reason and so we had to create a new domain name called ww2.domain.com to build the new site. So now we have the new site up and appartly some PDFs and pages are being directed to the from the old site. www.domain.com but 10,000 pages /PDFs are still indexed in Google and are not redirected. So when you open the page you get the old www.domain.com instead of it redirecting to ww2.domain.com. It's sort of a mess! My question is can we just kill the old domain name and move the ww2.domain.com back to the old domain? We also want to do away with the ww2.domain.com and go back to www.domain.com. I know it's confusing as heck! What would you recommend?
Web Design | | Eagle-ABS0 -
Fixing my sites problem with duplicate page content
My site has a problem with duplicate page content. SEO MOZ is telling me 725 pages worth. I have looked a lot into the 301 Re direct and the Rel=canonical Tag and I have a few questions: First of all, I'm not sure which on I should use in this case. I have read that the 301 Redirect is the most popular path to take. If I take this path do I need to go in and change the URL of each of these pages or does it automatically change with in the redirect when I plug in the old URL and the new one? Also, do I need to just go to each page that SEO MOZ is telling me is a duplicate and make a redirect of that page? One thing that I am very confused about is the fact that some of these duplicates listed out are actually different pages on my site. So does this just mean the URL's are too similar to each other, and there fore need the redirect to fix them? Then on the other hand I have a log in page that says it has 50 duplicates. Would this be a case in which I would use the Canonical Tag and would put it into each duplicate so that the SE knew to go to the original file? Sorry for all of the questions in this. Thank you for any responses.
Web Design | | JoshMaxAmps0 -
To many scripts in my homepage. This is a problem in SEO?
I adding a lot of new features to my website: JS animated, menus, google translate, alexa counter, google analytics, salesforce, and so on. My website is full of scripts and im worry about the SEO. Is that an issue?
Web Design | | Naghirniac0 -
How do I identify what is causing my Duplicate Page Content problem?
Hello, I'm trying to put my finger on what exactly is causing my duplicate page content problem... For example, SEOMoz is picking up these four pages as having the same content: http://www.penncare.net/ambulancedivision/braunambulances/express.aspx http://www.penncare.net/ambulancedivision/recentdeliveries/millcreekparamedicservice.aspx http://www.penncare.net/ambulancedivision/recentdeliveries/monongaliaems.aspx http://www.penncare.net/softwaredivision/emschartssoftware/emschartsvideos.aspx As you can tell, they really aren't serving the same content in the body of the page. Anybody have an idea what might be causing these pages to show up as Duplicate Page Content? At first I thought it was the photo gallery module that might be causing it, but that only exists on two of the pages... Thanks in advance!
Web Design | | BGroup0