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
-
Website url structure after redesign and 301 redirect chains - Looking for advice
OK, been trying to piece together what is best practice for someone I'm working with, so here goes; Website was redesigned, changed urls from url a to url b. 301's put in place. However, the new url structure is not optimal. It's an e-commerce store, and all products are put in the root folder now: www.website.com/product-name A better, more organized url structure would be: www.website.com/category/product-name I think we can all agree on that. However, I'm torn on whether it's worth changing everything again, and how to handle things in terms of redirects. The way I see things, it would result in a redirect chain, which is not great and would reduce link equity. Keeping the products in the root moving forward with a poor structure doesn't feel great either. What to do? Any thoughts on this would be much appreciated!
Technical SEO | | Tomasvdw0 -
1000 Pages on old website. What to do with the 301 redirects for this domain?
Hi Moz Community, I have a 301 redirect question... I just acquired an old domain: Totally in my niche Domain is 14 years old Website exists of 1000 pages Great amount of backlinks Website is offline since about 2 weeks Will place a new website online asap with new url structure For the 50 best scoring pages I wrote a new, but fully comparable/related article. I will put a 301 redirect from those old to the new pages. My question: What to do with the 950 other url's? Should I put a 301 redirect to the homepage? Should I forward those pages to the 404 page? Should I divide the 950 url's with a 301 redirect to the 50 new ones? Another solution maybe? Any idea what would be the best solution so we can save as much Google juice as possible? Thanks in advance!
Technical SEO | | snorkel0 -
404 to 301 redirects is there a limit?
Hi We've just updated our website and have binned out alot of old thin content which has no value even if re written. We have a lot of 404 error on WMT and I am in the process of doing 301 redirects on them. Is there a limit to the number of 301 the site should have?
Technical SEO | | Cocoonfxmedia0 -
To 301 or not to 301?
I have a client that is having a new site built. Their old site (WP) does not use the trailing / at the end of urls. The new site is using most of the same url names but IS using the /. For instance, the old site would be www.example.com/products and the new site, also WP, will be www.example.com/products/. WordPress will resolve either way, but my question is whether or not to go in and redirect each matching non / page to the new url that has the /. I don't want to leave any link juice on the table but if I can keep the juice without doing a few hundred 301s that certainly wouldn't suck. Any thoughts? Sleepless in KVegas
Technical SEO | | seorocket0 -
301 Redirects in subfolders
Hi, we're making our site into a static site but I would like to transfer the Google juice. Most of the links and database exist on subfolders though. Could I simply do 301 redirects on the subfolders and retain the value or does it have to be on the full domain?
Technical SEO | | Therealmattyd0 -
Site Penalized - 301 Redirect Question
Hello, We have a website that was penalized roughly two years by Google for "Unnatural Links"... We are experiencing a lot of problems with this site, completely unrelated to the penalty or SERPS, and we're debating doing a 301 Re-direct to another site we own that is totally clean and has no "Unnatural Links". If we do a 301 from the penalized site to our alternative website, will there be any cross-contamination? Will the penalty carry over to our other site? Please let me know what you guys think. Thanks
Technical SEO | | Prime850 -
Identifying a 301-redirect problem?
I was looking at the Search Engine Optimization reports for one of my clients in Google Analytics, and I saw that their two biggest landing pages are www.website.com and http://website.com. Does this mean that Google is serving both the 'www' and 'non-www' versions of the website, and thus harming the website's overall ranking? Thanks for any input!
Technical SEO | | williammarlow0 -
301 redirecting a mobile site.
Is it possible to selectively 301 redirect mobile/tablet user agents and google robots from the desktop version of a website to a mobile site? Would this preserve the SEO for the desktop website while optimizing the mobile/tablet site for mobile SEO?
Technical SEO | | inc.com0