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
-
Related topics / content suggestion
Hello, In the related topic feature now called content suggestions https://mza.seotoolninja.com/blog/related-topics-in-moz-pro. Are the words indicated words to include in my content or are they "topics" to talk about using words that would describe those words turning these words into concepts ? Thank you,
Moz Bar | | seoanalytics0 -
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 -
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 am doing the On-page SEO for a website that's never had any SEO done before. I will start with the Pages. Is it necessary to do SEO/Keywords for older Posts?
Using the On-Page Grader to perform SEO on pages of WordPress website. This website never had any SEO done before. Should I go back and perform the same work on the Post Pages?
Moz Bar | | Joseph.Lusso0 -
Duplicate page content/page titles on tages
Hello everyone. New to the community and loving it already. Question, I am receiving an error of 6 pages with duplicate content and page titles. A majority of these are tag pages. Should I be worried about these? IN the column listed duplicate urls it is listing 0 ( screen shot: http://screencast.com/t/azvuVk0ucWt) Are these tags a problem? Will SEO be hurt because of this? What are TAG pages? Actually pages, categories, should I eliminate these?
Moz Bar | | Jasonalanmagic0 -
How to find all 301 redirect for URL xyz.com/products (internal and external)?
This is what we are thinking: Get all URL of the xyz.com/products using XENU software. Search those URL on google (site;xyz.com url ) to find out if they are crawled by google, do the same on bing (as currently google shows 4k URL and bing 11k ) Use opensiteexplorer (301 redirect ) and using (internal external) to get the desired result. Is this the right approach? If not, what is the best way to find the correct result? All suggestions are welcome.
Moz Bar | | tpt.com0 -
Find all the back links to all the posts/pages within the blog subdirectory only.
Hi, I am new to Moz. I using the open site explorer to find backlinks for a website's blog. The website itself is huge. I want to find all the backlinks to all the posts/pages within the blog subdirectory only. Not the regular website. I ran a few reports, but it is giving me links to that page, not all the sub pages.Fi
Moz Bar | | DarrenD0 -
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