302 or 301 redirect to https ?
-
I am redirecting whole site to https. Is there a difference between 302 or 301 redirect for seo?
Site never been indexed.
Planning to do that with .htaccess command
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]There are plenty of ways http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html
Which way would be the best?
Thanks is advance
-
Thanks,
Yes the site from the beginning will be https. We do have a good server, site speed according to google speed tool is 93.
Sha, added [R=301,L] and now it's 301.
-
HTTPS based sites normally add a little stress to the server for handling requests, make sure you are hosted on a good performance web host for users & search engines to access content fast. If you're making HTTPS as the default version and if bots take time to crawl your website, it might after your crawl rate (and possibly ranking)
Just like how we see WWW and non-WWW, HTTP and HTTPS are looked as two different sites by search engines, I'd highly suggest you to go with 301 (permanent) re-direct from the start to save link juice. Keep your SSL certifications valid. If you don't intend to do 301 from start, check your logs often to see if you get any links to HTTP version (as most often people try to link here) and request webmasters to update the link to HTTPS if you want to see your HTTPS version ranking in SERPs.
My personal suggestion is to stick with one and doing 301 before you launch the site live.
Cheers
-
oops,
Thanks for the pickup
-
Hi Sha - I think you meant Serge not Woj
But yes, good pick up - I omitted that detail in my hasty reply
-
Hi Serge,
The reason your redirect is creating a 302 is that it is an unspecified Redirect.
Any redirect that is unspecified will by default be seen as a 302 (Temporary)
To create a 301, you need to specify like this
[R=301,L]
Hope that helps,
Sha
-
301 - try this (in it's simplest form):
RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]
-
Thanks, I understand 301 and 302. This command creates 302. I see a lot of website in serp having 302 to https, but also I see a lot with 301. Which is right for Seo when in comes to https?
-
301 = permanent redirection
302 = temporary redirection
If the change is permanent then 301
The htaccess rewrite looks fine
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
-
Recently migrated to https version of volusion site. 301 redirect link chain question
I recently migrated to a https version of a volusion site. They have some type of internal 301 redirect method to accommodate for the entire site. I have also used the 301 redirect manager to redirect categories and pages which I have changed. The question is if I have changed a page internally in the redirect manager from say source. /bluewidget to say. target. /superbluewidget is it wiser or even possible to do it this way to reduce the redirect chain from 3 to 2 steps source. /bluewidget to. target https://www.example/superbluewidget can a relative link be targeted to a full url to reduce steps in a 301 redirect link chain. Thanks
Technical SEO | | mrkingsley0 -
301 redirected all my pages to my new domain, now I have a problem with Google Search Console
Hi guys! I bought a new domain name and redirected all my URLs from the old domain to the new one. Everything worked perfectly but now I have a little problem. I want to use the option 'Address Change' in google search console. Step 1 Works (Select new website in the list) Step 2 Works (Confirm that the 301 are working) Step 3 Asks me to Verify the old domain (huh!?) in order to complete the request. Obviously that doesn't work because my 301s WORKS! So if I try to verify the old website by putting a google file in the root of my domain Google tries to access it and it automatically redirects to the new domain. I must be missing something lol help!
Technical SEO | | benoit_20180 -
301 redirecting a previously abused URL
A client previously had their most important landing page at domain.com/example.htm They carried out the sort of link building that was commonplace a few years back (exact match anchors, paid blog links etc) targeting this URL, but they also got a bunch of legitimate decent quality links here. I believe they may have had a number of issues when link quality algo updates were rolled out, so rather than try and get links removed and go through the disavow process they instead decided to abandon this URL, let it 404 and start afresh at domain.com/example.html - updating all internal navigation, XML sitemaps etc. So fast forward to today. What is the best practice for this URL these days do we think? Is it now possible to 301 domain.com/example.htm > domain.com/example.html and recover whatever value may be left here? The argument for not doing so may be that you could pass over the negative metrics associated with the old URL, but would this not be handled by the real-time penguin update and the poor links just devalued rather than actually harming? And could this just be tested - i.e. add in the 301, monitor the impact and if things don't go the way we'd want then just remove the 301 again? Would be keen to get a few opinions on this. TIA
Technical SEO | | Salience_Search_Marketing0 -
301 vs 302
Hello everyone! I'm working with a site right now that is currently formatted as subdomain.domain.net. The old version of the site was formatted as domain.net, with domain.com and several other variants redirecting to the current format, subdomain.domain.net. All of these redirects are 302, and I'm wondering if I should have all these changed to 301. Many of our old backlinks go to the old format of domain.net and i know the juice isn't being passed through, but i was wondering if there is any reason why you may want a 302 over a 301 in this case? Any insight would be appreciated. Thanks!
Technical SEO | | KathleenDC0 -
Why can't I redirect 302 errors to 301's?
I've been advised by IT that due to the structure of our website (they don't use sub-folders) it's not possible to change 302's to 301's. Is this correct, or am I being fobbed off?
Technical SEO | | lindsaytuerena0 -
Http to https - is a '302 object moved' redirect losing me link juice?
Hi guys, I'm looking at a new site that's completely under https - when I look at the http variant it redirects to the https site with "302 object moved" within the code. I got this by loading the http and https variants into webmaster tools as separate sites, and then doing a 'fetch as google' across both. There is some traffic coming through the http option, and as people start linking to the new site I'm worried they'll link to the http variant, and the 302 redirect to the https site losing me ranking juice from that link. Is this a correct scenario, and if so, should I prioritise moving the 302 to a 301? Cheers, Jez
Technical SEO | | jez0000 -
301 Redirect Domain or 301 Redirect Domain + Interior Pages
Hello - My company acquired another company in our industry and our IT team immediately set up the acquired companies domain name as a an alias to our site. This created a duplicate version of our website under another domain name and Google started ranking interior pages from the aliased acquired site for several top keywords that were previously held by our real site. Should we 301 redirect just the top level domain name of the acquired site to the real site or 301 redirect the top level domain name and the interior pages on the acquired site to help ensure that our real domain will take back the rankings it once had? Thanks!
Technical SEO | | Room2140 -
Why is a 301 redirected url still getting indexed?
We recently fixed a redirect issue in a website, and although it appears that the redirection is working fine, the url in question keeps on getting crawled, indexed and cached by google. The redirect was done a month ago, and google shows cached version of it, even for a couple of days ago. Manual checking shows that its being redirected, and also a couple of online tools i checked report a 301 redirect. Do you have any idea why this could be happening? The website I'm talking about is www.hotelmajestic.gr and its being redirected to www.hotel-majestic.gr
Technical SEO | | dim_d0