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.
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
-
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 can a page have high Google/ organic traffic but show no ranking keywords in Moz?
We have a page on our website with a higher than average number of pageviews, 85% of which came from Google organic search. When I research this page by entering the URL into the "exact page" keyword research tool, Moz says it has no ranking keywords. How can a page be earning organic traffic without ranking for any keywords?
Moz Bar | | baystatemarketing0 -
Does "Disallow: /xmlrpc.php" in robots.txt affect moz tools ability to fetch DA?
Just checked a website for Domain Authority using Moz' tool, however it returned 1 for DA, which should be unlikely. I have been trying to find the problem and found "Disallow: /xmlrpc.php" in robots.txt. Could this affect Moz' tools ability to get the required data?
Moz Bar | | Foli0 -
New verison / update on MozBar. What are the changes from the changes (new additions) from the previous version?
MozBar has a new Version update: 3.1.189 in Google Chrome Web Store (updated on Jan 20, 2016). Has anyone observed any big changes / additions? Or, is it just a routine version update?
Moz Bar | | w1t0 -
Moz Bar not providing any data. Tried logging out/back in and un/re-installing, but no dice.
Used Mozbar for a long time, and normally works fine. Suddenly finding that it is not providing any data. All of the fields are there, but it does not provide me with PA/DA, etc, and all social metrics are at 0. This is across all sites, not just on in particular. Have tried logging out and in, deactivating and activating, and reinstalling. Nothing has worked.
Moz Bar | | SearchPros2 -
301 Redirects detected as duplicates
I have 19 pages that are all 301 redirected to the same page. Moz is detected these 19 pages a duplication's of each other. Does anyone know how to solve this issue?
Moz Bar | | Worship_Digital0 -
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 -
Can you track amount of visitors to competitive websites/blogs?
We are trying to understand our website traffic, specifically our blog, compared to our competitors. Can we use Moz to understand actual visitor metrics against competitive domains?
Moz Bar | | AppNeta0