301/302 header
-
Hi,
I changed from http to https with SSL certificate and have added the following code in my htaccess:RewriteEngine On
RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://www.mysitesurl.com/$1 [R,L]RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]But Moz returns a:
Temporary Redirect
Using HTTP header refreshes, 302, 303, or 307 redirects will cause search engine crawlers to treat the redirect as temporary and not pass any link equity to other pages. We highly recommend that you replace temporary redirects with 301 redirectAnd additional header checkers return a 302 also when I check http://www.mysitesurl.com/:
HTTP/1.1 302 Found =>
Date => Tue, 05 May 2015 09:31:18 GMT
Server => Apache/2
Location => https://www.mysitesurl.com/
Content-Length => 214
Connection => close
Content-Type => text/html; charset=iso-8859-1Anybody an idea why there is no 301 result?
Thanks
-
Perfect, glad it helped!
-
Hi Matt,
Thanks for that, have changed the code as you advised to:
RewriteEngine On
RewriteCond %{HTTPS} !^on$
RewriteRule (.*) https://www.mysitesurl.com/$1 [R**=301**,L]RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]and it seems to work!
HTTP/1.1 301 Moved Permanently =>
Date => Tue, 05 May 2015 12:07:49 GMT
Server => Apache/2
Location => https://www.mysitesurl.com/
Content-Length => 238
Connection => close
Content-Type => text/html; charset=iso-8859-1Thanks a bunch!!!
-
Ok thanks for the PM. I see the issue now - didn't need the URL after all, just a few more minutes to process.
The redirect is matching the first rule. You only have R,L so R by itself defaults to 302. It's picking up that before the other rule so it stops processing.
Set the top rule to R=301 and make sure you see a true 301 after that. If not, I'm wrong. haha But I think that's it.
-
Going to need the actual URL I think. If you can't post here, PM it - but I don't see the issue.
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
-
Site Crawl 1-page 301 status error but httpstatus.io says its 403
I am trying to run a site crawl for my website and MOZ is only resulting in 1 page crawled with the home page URL Status Code of 301. However when I run it in httpstatus.io it is giving me a 403 status error. Im curious as to why MOZ is saying its a 301 and httpstatus.io is saying 403. Is there anything I can do in MOZ first to get the site crawled before asking my developers to look into the 403 error?
Moz Bar | | JohnConover0 -
How To Stop Moz Crawl From Prepending /blog/ on all our site urls that it crawls
Hello, At some time in the past our WP site had urls like this: www.oursite.com/blog/post-title-pretty-link The site has not used that url structure for quite some time, but Moz crawl is still hitting every post with /blog/prepended and as a result is generating thousands of 404s. When the /blog/ is removed from the url, then the urls work fine. Where are those old urls being stored and how can we update them? How do we address this issue? Any assistance will be appreciated. Thanks!
Moz Bar | | dbcooper1 -
Http://stairwaysinc.com and spiral
Why does your on-page grader show zero occurrences for the word "spiral" on stairwaysinc.com? Spiral appears many, many times.
Moz Bar | | BCLLC0 -
Http:// https:// google search console crawl errors
How to direct http:// to https:// to get rid of 404 errors in google webmaster search console (http:// crawl errors)
Moz Bar | | O.D.0 -
Why RogerBot can't crawl site https://unplag.com
Hello Please help me to solve the problem. The on-page grader and Crawl Test are not working for Unplag.com website. Both said that they can't access the url. Yes, I've tried different variants like unplag.com, http://unplag.com One more thing - RogerBot was disallowed in robots.txt file. I deleted it from the file a week ago so maybe moz index haven't been renewed.
Moz Bar | | Targeras0 -
I'm getting a Crawl error 605 Page Banned by robots.txt, X-Robots-Tag HTTP Header, or Meta Robots Tag
The website is www.bigbluem.com and is a wordpress site. I'm getting the following error: 605 Page Banned by robots.txt, X-Robots-Tag HTTP Header, or Meta Robots Tag But what is weird is the domain it lists below that is http://None/BigBlueM.com Any advice?
Moz Bar | | TumbleweedPDX1 -
Moz / more changes on the way?
I love Moz and the community and all the tools here. I admit I haven't rolled around in all the new things rolled out a few months ago. I thought there were more changes on the way but I wasn't sure if those already happened and I missed them or if I need to be patient? Affiliate program, client reporting? Thanks for any response. Have a great weekend! Matthew
Moz Bar | | Mrupp441 -
Does Moz Pro generate similar keyword phrases in a list (preferably showing their difficulty %) or is it only one phrase at a time with no similar words/phrases suggested?
I just signed up for Moz Pro but the keyword research seems to only let you try one keyword phrase at a time. Is there a way for it to give related keywords along with their difficulty % info, etc. It is far too slow and inconvenient doing one at a time.
Moz Bar | | SavingSpotlight0