Redirecting https pages
-
If I add 301 redirects from the https versions of the root domain to the http:www.website.com (canonical version), will this prevent users from being able to access the https version? I believe the https version is only accessed once users log into the site.
Thank you!
-
To directly answer your question, Erin, a 301 redirect will indeed prevent users from accessing the https versions of your pages and is not the recommended approach.
Is there a reason you want to prevent users/search engines from accessing the https versions of your pages?
Simply ensuring that all links within the site navigation point to http versions, and setting a rel=canonical on all https versions back to the http versions, should do the trick.
Best,
Mike -
What you want to do is setup the redirect for all pages "except" those pages that you want to require a person to use the https.
As an example on a site I work on, we have two areas /cart/ and /account/ that represent when someone is checking out or when they are logged into their account and want to update payment options, respectively. You would exclude these folders from the https to http 301 redirect so that users could then use that part of the site in secure mode.The rest of the site you want to have the https 301 to http. The reason you go through all this is that a http and https versions of the site, if spidered, would be considered duplicate content and you want to prevent that.
The other part of this would be that you do not want the search engines (usually) to spider the shopping cart and user login sections of a site. Nofollow noindex all links that lead to those pages and also put those folders in robots.txt - that will keep the bots out of there.
One other thing. Make sure that your templates and content within the https sections of the site link out to the non https urls. The 301 will help with this, but why link to the wrong URL anyway?
All of that said. If your site is one that you deal with highly sensitive information (medical, financial come to mind) then you may simply want to have the site run as https. You would need to bulk up your server resources to handle this as https can slow things down a little bit, but it can be done.
-
It is going to be a little bit more difficult than that. Unless you have a wildcard certificate your ssl certificate is not good for sub domains. www.site.com is considered a sub domain of site.com. That being said, I would use url rewriting to handle the problem. Here is a small example of what you could use.
Rewrite Rules for site.com
RewriteEngine On
RewriteBase /Redirect from example.com to www.site.com
RewriteCond %{HTTP_HOST} ^site.com [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]Turn SSL on for payments
RewriteCond %{HTTPS} off
RewriteCond %{SCRIPT_FILENAME} /payments.php [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]Turn SSL off everything but payments
RewriteCond %{HTTPS} on
RewriteCond %{SCRIPT_FILENAME} !/payments.php [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]You will have to enter the other pages that you want to be ssl too, this should get you started though.
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
-
Google Index HTTPS
Hi,
On-Page Optimization | | JohnHuynh
I had a HTTP protocol file which indexed. Now I want to change this file to HTTPS protocol. I wonder that is there any effects?
I don't know HTTPS would be indexed by google or not? Thanks,0 -
301 Redirect to product page or category?
We manage an ecommerce website that sells health products. A few products have now been discontinued. I’m just wondering what would be the best practice in this case. Should we 301 redirect to a similar product or to a similar category page? ANY HELP IS GREATLY APPRECIATED!
On-Page Optimization | | odegi0 -
Duplicate page title - blogs
Hope someone can help me, I am a total SEO noivce so please be gentle. My first report shows that I have duplicate page titles. I have been through and changed all of these so they are different and after my latest crawl they are still showing as duplicates. I am wondering if this is because it;s a blog, here is one of the duplicates: http://www.cottagesoapcompany.co.uk/blog/?row=1 Hope you can help!
On-Page Optimization | | emmamoulden0 -
Duplicate Page Title
I have a dating site, it's got a lot of duplicate page titles, most of them are the language buttons for the users to view the site in there language. but I think it's obvious that the buttons don't have anything to do with it. I'm thinking that page tittle is basically a description of what the site is. like for an example "online-dating" is this it? please tell me in terms for a dummy, how to fix it.
On-Page Optimization | | clickit2getwithit0 -
Why is the seomoz showing it crawled 3 pages when i only have 2 pages?
I had seomoz crawl my site. I only have 2 pages. The site url is www.autoinsurancefremontca.com.
On-Page Optimization | | Greenpeak0 -
On-page keyword usage
SEOMOZ gave me all zeros for keyword usage. Why? The site is www.grass2greens.com and the keywords are "Asheville Landscaping Edible." The site includes these words in the title page and throughout the body text. I am not really sure, but maybe one cause for these low keyword usage ratings might be redirects or some meta tag issues, but I am really not sure. Any ideas?
On-Page Optimization | | dcaudio0 -
Canonical to the page itself?
Hello, I'd like to know what happens when you use canonical to the same page itself, like: Page "example.com" rel canonical="example.com" Does that impact in something? Bad or good? See ya!
On-Page Optimization | | seomasterbrasil1 -
How do you fix on page SEO ?
I have been trying to push my foundation website in organic search results for competitive keywords , i have been not been so consistent in raking our website in top search results of Google. can some one recommend the guidelines and activities which can really push my websites to Google first page. More Info: about our foundation We are the worlds largest school meal run ngo in the world feeding over 1.3 million school children in India Wesite url www.akshayapatra.org
On-Page Optimization | | AkshayaPatra0