301 redirect
-
Hi All,
I have just completed a 301 redirect on my site http://www.klinehimalaya.com and I was just starting a new campaign on SEOmoz and I got this message:
Roger has detected a problem:
We have detected that the domain www.klinehimalaya.com and the domain klinehimalaya.com both respond to web requests and do not redirect. Having two "twin" domains that both resolve forces them to battle for SERP positions, making your SEO efforts less effective. We suggest redirecting one, then entering the other here.My only other question, is my .htaccess codeing correct and how long will it take to show it is correct in SEOmoz and online?
All ".htaccess" code:
AddHandler php-stable .php
**_Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]RewriteRule (.*).html$ /$1.php [R=301,L]_**
Lastly, I have recently changed all of my files from .html to .php is this going to hurt my SEO and is the code "RewriteRule (.*).html$ /$1.php [R=301,L]" going to fix the issue by redirecting the .html links to the .php pages?
Any suggestions or help appreciated.
Paul.
-
Sorry, for some reason the formatting on my comment got removed. Hopefully you can still follow.
-
Hi Paul, Assuming you're trying to rewrite to the www. version, cold you try replacing your code with the following RewriteEngine On RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] We use that code for all our redirects. Obviously an easy check is to try to visit the non-www version and see if it redirects to www. (Your current redirect doesn't.)
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
-
Http -> https redirections / 301 the right way
Dear mozers, Thank you for your time reading the message and wanting to help! So, we have moved our WordPress to https and redirected all the content successfully via htaccess file. We used a simple 301 redirect plugin, which we are using to redirect old URLs to the new ones. The problem today is, the redirections in the plugin are not working for http version. Here is an example: htaccess redirect: http --> https Plugin redirect domain.com/old --> domain.com/new but, the url http://domain.com/old is not redirecting to https://domain.com/new while https://domain.com/old does redirects to https://domain.com/new What can you suggest as a solution? Thank you in advance! P.S. I don't think having 2 redirects for each version of the URL is the smartest solution Best wishes, Dusan
Technical SEO | | Chemometec0 -
What if my developers tell me they can only handle a certain amount of 301 redirects?
We recently launched a new site and I felt the need to redirect all of our old site URLs to the new site URLs. Our developers told me they would only be able to do about 1000 before it starts to bog down the site. Has anyone else came across this before? On top of that, with our new site structure, whenever our content team changes a title (which is more often than i had hoped), the URL changes. This means I'm finding i have many other redirects I need to put in place, but cant at the moment. Advice please??
Technical SEO | | CHECOM0 -
Existing content & 301 redirects
Hi All, I will try to keep this to the point. One of our websites was hit by penguin for unnatural linking. We are building a new site (same business, different domain), but we would like to take some of the pages/content off the old website and use it on our new site. Is it just a case of copying each page onto our new site and 301 redirect the old URL? Or should I just be completely rewording/recreating the old content so it is unique? Any help on this would be great, but I am also open to alternate methods too. Thanks Lewis
Technical SEO | | SO_UK0 -
301 redirect of one site version to new domain
Hello all. I today have domain.com that has 10 language versions and the structure is by folders: domain.com/ru/
Technical SEO | | Gregos
domain.com/pl/ etc. Soon I plan redesign,new CMS and I plan to register 9 new ccTLDs. My question is: Can I 301 redirect domain.com/ru/ to domain.ru without having some bad effect on domain.com? I mean,the main domain,com is not going to be affected by permanent redirect of one url to completly new domain right?0 -
Does 301 redirect cause penalty
Good Morning, I am considering doing a 301 (permanent) re-direct of roughly 100 domains, split between my 3 main e-commerce sites. Would taking an action like this put any of the 100 domains or any of the 3 recipient domains at risk of violating G's guidelines? Thanks...
Technical SEO | | Prime851 -
301 Redirection of entire section to the homepage
Hi Guys, So here's the deal. Let's say I have a site at mysite.com/ which talks about tomatoes, and I also have a subsection that talks about potatoes at mysite.com/potatoes I want to stop providing information about potatoes altogether so i'm thinking about doing a 301 redirection from all of the pages at mysite.com/potatoes(.*) to the home page. The thing is, mysite.com/potatoes actually has a great page authority (3475 links from 145 domains) so I really don't wan to lose all that juice... Here are my questions: Will the links be added to the ones i have for the homepage already? Since my home page and my /potatoes section ranked for 2 different subjects, how is this transfer going to affect my rankings for the homepage? will it now also rank for both tomatoes AND potatoes? How much time does it usually take for google to recognize the 301 and pass the link juice? Any other tips on optimizing this process? Thank you for your time! -francois
Technical SEO | | nyakim0 -
Accidently did a 301 redirect on root domain and lost domain keyword position
I just bought a domain about a week ago and instantly ranked number 4 for for my keywords with the domain keyword bonus. I created a landing page off the root of my domain while I'm building out my main site. I accidentally did a 301 redirect instead of a 302 from my root to my landing paging and this resulted in me losing my position and only being about to find my domain in the google if I searched for my domain specifically. Anyway to regain my original position? I have removed the redirect. Have I been put in the sandbox?
Technical SEO | | JohnTurner790 -
Redirect
How do I redirect this url: http://www.example.com/img/head/beauty-spa.jpg" width="114" height="50" alt="image"/></a> </div> <div class="c0 r"><a href="/m/imgres?q=short+holiday+treatments Thank you for your help.
Technical SEO | | petrakraft0