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
-
301 Redirect Expert
I have hired two website people from odesk and had bad experience in 301 redirects. One never got it done and the other cause my website to crash on a 500 error code, he load all the redirects in a script on .htaccess on my wordpress site on godaddy, there were 1400 redirect.Can somebody recommend a expert for my redirect problem.
Technical SEO | | tjacquet0 -
Should I do a 301 redirect
Hi Everyone, Hope you can help me out here. I have .co.uk & .ie website with similar content. On a particular section of the .co.uk website it is updated daily (Q&As, Blog posts etc) .ie does have this section but to a lesser degree, no daily updates etc, I was wondering if we should simply do a 301 redirect when someone is on the .ie website to .co.uk, it means the user is getting a much better experience however not entirely the consequences from search engines on this? Thanks
Technical SEO | | Paul781 -
301 Redirect with ASP (not .NET)
I'm looking to redirect non www to www and also .co.uk to .com. http://www.xxxxx.com is the intended target. http://xxxxx.com & http://www.xxxxx.co.uk & http://xxxxx.co.uk to redirect. I managed to do some of this but if I come through to a service page /services/cars.asp it redirects to the homepage. All I have so far is this code: <% If InStr(Request.ServerVariables("SERVER_NAME"),"www") = 0 ThenResponse.write "http://www." & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("URL") & "?" & Request.ServerVariables("QUERY_STRING")Response.EndEnd if %> What am I missing?
Technical SEO | | Hughescov0 -
301 Redirect From Dynamic Page To Static
I want to 301 redirect all "id" and "type" numbers from my page dynamic.php page (I have thousands of IDs and thousands of Types) all to a single URL. So for example the following.... www.mysite.com/dynamic.php?id=1&type=5 www.mysite.com/dynamic.php?id=2&type=5 www.mysite.com/dynamic.php?id=3&type=5 www.mysite.com/dynamic.php?id=1&type=6 www.mysite.com/dynamic.php?id=2&type=6 www.mysite.com/dynamic.php?id=3&type=6 ...would all be sent to: www.mysite.com/page.html How can this be done without doing a redirect for each ID/Type?
Technical SEO | | TheDude1 -
424 Crawl Notices Found - Most of these notices are 301 redirects for our blog. Are notices something that would keep me from ranking well for my keywords?
212 are rel canonical and 176 are 301 permanent re-direct. An example of the re-direct is a change I made to the /trackback 302 status on my blog like; http://www.bluesunproperties.com/2012-spring-biker-rally-thunder-beach/trackback/ Are these Crawl Notices something that I should spend resources on, or should I focus more on my errors and warnings?
Technical SEO | | classa0 -
301 redirect issues
Hi all, I'm hoping someone will be able to help me with an extermley frustrating problem with 301 redirects in .htaccess. Basically I'm trying to redirect some old pages (from our old website) that stil rank to the new equivilent. For example - old url = www.domain.com/frames/news/company-news/news-reader.php?newsStoryID=395 New www.domain.com/news/article-title I've tried the simple redirect 301 /frames/news/company-news/news-reader.php?newsStoryID=395 http://www.domain.com/news/article-title But this doesnt work. I've also tried - RewriteEngine on
Technical SEO | | EclipseLegal
RewriteCond %{QUERY_STRING} ^newsStoryID=395$
RewriteRule ^/news-reader.php$ http://www.domain.com/news/article-title/? [L,R=301] Could anyone help? I've followed lots of tutorials that all match the above but it just doesn't work! The only other thing within the htaccess file is from wordpress for pretty permalinks - BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule> END WordPress Many thanks in advance!0 -
Does 301 redirecting a site multiple times keep the value of the original site?
Hi, All! If I 301 redirect site www.abc.com to www.def.com, it should pass (almost) all linkjuice, rank, trust, etc. What happens if I then redirect site www.def.com to www.ghi.com? Does the value of the original site pass indefinitely as long as you do the redirects correctly? Or does it start to be devalued at some point? If anyone's had experience redirecting a site more than once and they've seen reportable good/bad/neutral results, that would be very helpful. Thanks in advance! -Aviva B
Technical SEO | | debi_zyx0 -
301 Redirect NOT Working as Expected - HELP!
Hi! I just launched our newly coded site and just realized the installed 301 is NOT working. The URL string is the same EXCEPT for the removal of /shop/. Here is the code in .htaccess: ############################################ enable rewrites Options +FollowSymLinks RewriteEngine on #RedirectMatch 301 ^/shop?/$ http://hiphound.com/ RedirectMatch 301 ^/shop?/$ http://hiphound.com ########################################### When I go to Google and click on an old link I get a 404. No bueno!! Here is an example: http://hiphound.com/shop/rubit-dog-tag-clip I thought (and was told) that the installed 301 would send this page to: http://hiphound.com/rubit-dog-tag-clip It's not. Please HELP!! 🙂 What am I doing wrong??? Lynn
Technical SEO | | hiphound0