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
-
301 Redirect all pictures when moving to a new site?
We have 30,000 pictures on our site. Moz will return 404's on some occasionally, but Google seems to ignore those. Should I 301 redirect all those images when we move to a new site lay-out? Appreciate your views!
Web Design | | Discountvc0 -
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 -
WordPress and Redirects
I just converted my site to wordpress. Previously urls like www.waikoloavacationrentals.com/kolea-rentals/9g and www.waikoloavacationrentals.com/kolea-rentals/9g.html would go to the same page. Since using wordpress the first one will not work. I did not have redirects set up so was wondering if there is something I am forgetting to easily make it to where if someone types in both urls it will go to the same page.
Web Design | | RobDalton0 -
Advanced 301 Redirects
Hi all! I'm moving a blog from a subdomain to a folder on my root domain and want to make sure I am properly implementing 301's. Is there a code or method for making specific pages 301 to the corresponding new URL without having to manually 301 each? For example, a current blog may exist at blog.website.com/3-tips-for-selling-your-home and, since we are moving the blog, will now exist at website.com/3-tips-for-selling-your-home. We obviously want to implement 301's to ensure any link equity carries over to the new url. Anyone know how to implement these in scale to without having to set up each manually? Thanks!
Web Design | | RickyShockley0 -
Wordpress - redirecting tags
I just ran a webmaster tool from Yoast SEO premium and notice I have a lot of problems with tags (restricted-robots-txt) For example : http://www.soobumimphotography.com/tag/wedding-group-photo/ Do I have to redirect to http://www.soobumimphotography.com/wedding-group-photo/ Should I do this to each and every posts Thank you
Web Design | | soobumim0 -
What happens if I 301 Redirect my homepage to a different page on site
If i were to 301 redirect the index page of my website to a page in a different subdirectory of my site would that adversely affect SEO? Does your home page need to be in the root of your site? I'm asking because a developer has told me that it would be best to do that since he needs to install OpenCart on the root of our domain...
Web Design | | SheffieldMarketing0 -
Redirect based on location best practice clarification?
Hi, i have a question that i have seen some other have also had. The question is what is the best practice to serve the location specific page to the user (based on their location)? This post (http://www.seomoz.org/q/redirecting-users-based-on-location) suggests against automatically redirecting the user based on IP address. I guess the primary concern is that Google bot will also be redirected in this case... I see a number of well known sites use automatic redirect based on location. Take Urbanspoon for example (http://www.urbanspoon.com/), they use a 302 redirect to redirect to location specific page. Do they not redirect Google bot? Is there any way to test this? Can creating a rule to exclude crawlers from redirect cause SEO problems? How? Another example that i am somewhat confused as to how it works effectively is groupon.com.au It selects my closest city (i assume using IP), however the URL stays as the root URL. For example, i typed in http://www.groupon.com.au/ and it stays as http://www.groupon.com.au/ with the city chosen as "Melbourne". The canonical url for this page is the root URL (ie http://www.groupon.com.au/). If you then select "change city" and click the same city (ie Melbourne), it redirects to http://www.groupon.com.au/deals/melbourne. Canonical URL of this page is http://www.groupon.com.au/deals/melbourne. How is this not duplicate content? Can you please advise on the best way to redirect (ideally automatically), to provide the best user experience, while still having Google bot able to crawl the site effectively? Thanks
Web Design | | blackrails0 -
Parked Domain or Redirect
Should I park a domain or Redirect? And what is the best way? I need to switch our domain name. I currently have all of our domains redirecting to our main website. I have set up there own hosting in our cpanel account so I could redirect them to our main domain. Was this too many steps? I tried putting all of our domains in our main domains, .htaccess file, and redirected them to our main website, but they did not work. So that is why I set up there own cpanel accounts. Now they work fine. However, my hosting company told me that I could just park the domain on our current domains account. If I can redirect all of these domain in one place, that would be great. I thought that a parked domain is considered duplicate websites, as both urls work, displaying the entire website with both urls. So Would I have to re upload our entire website to the account that I want as our main domain? Or is there another way of going about doing this?
Web Design | | hfranz0