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://moz.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 -
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 -
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 -
Spam score 9/17 and redirect Question
I sat on a .com domain, which name become increasing popular (xyzselfie) for 2 years ... 4 months ago I hired a VA to do a task. A miscommunication made this person submit my domain to the spammiest directories the internet has to offer. Also because of the domain name and the .com a lot of asian or weird sites/things posted links to my site. I have worked on my site for the last 4 months trying to lower my spam score from a 9. I have:
Moz Bar | | onlinegusto
-Disavowed all the sites that pointed to my site.
-Made more internal links
-Tried to make my content thicker
-Included my email and social profiles to the site In the process my competitors site with exact domain name but .net and more authority came on auction, I bought it and I pointed it with a permanent redirect to my site (hoping my site would in time lose its spam score). This site will generate and income by appearing in search and adsense ads. After months of work I'm at a loss what to do. Does the spam score generally take long to drop? Should i try and stop the permanent redirect and direct my .com to the .net domain? Are there experts who can lower my score? Should I look for non spammy directories in its niche and submit my site to them to increase link authority and nofollow links ? Any feedback or insight would be highly appreciated. fFtTOFk0 -
Can we access previous weeks/months key word analytic stats?
We're missing some data for our key word positioning from November and December of last year and I am looking to see if I can access this still? I realise i can access the previous weeks stats and also a month as a whole but is it possible to access previous weeks or months and how can i go about doing this? Thank you!
Moz Bar | | collection_260 -
My product pages have no weight / links from root domains with the Moz tool bar
Hi, When I view my home page (http://www.arkwildlife.co.uk) with the Moz toolbar, I see a good PA and a good amount of links from root domains. As I go down the site, it seems to get worse. The category pages (http://www.arkwildlife.co.uk/Category/0/Straight_Foods.html) have a little but not much and then from this point onwards, it's nothing. The product page (http://www.arkwildlife.co.uk/Item/Straight_Foods~Sunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html) is reporting to have no root domain links but I am not sure why. Interestingly, when I click through to a review page (http://www.arkwildlife.co.uk/StockReview/0/SUNH/0/Premium_Sunflower_Hearts.html) it does have some juice. Would anyone be able help on why this is happening and what I need to be looking at in order to resolve it please? EDIT: I've been looking at the hyperlinks and notice something odd. If I review the score with the first link below, it gives a score of 1, but the second gives a PA of 13 with one root domain linked. 1:http://www.arkwildlife.co.uk/Item/Straight_Foods~Sunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html 2:http://www.arkwildlife.co.uk/Item/Straight_Foods%7ESunflower_Seeds/SUNH/Premium_Sunflower_Hearts.html Please note the "%7E" instead of the "~" in the URL. The browser appears to show the ~ character no matter what but the rank of the page changes. I don't understand what the Moz toolbar is doing with this. Note: This behaviour only happens in Mozilla Firefox, in chrome both the rankings are zero for each URL. Many Thanks.
Moz Bar | | nawgie0 -
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 -
Moz Analytics/Reports into PDF
Hey guys The Moz Analytics is great however I don't seem to be able to download the data into a PDF. I used to be able to do this but it won't let me anymore. Its vital we can do this so we can send to our clients anybody got any ideas? Am I being blind or has this been omitted??
Moz Bar | | tempowebdesign1