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
-
Redirect chains and rankings
Hi All, I've got interesting question for Moz community today. Has redirect chain got any impact on rankings or not? Thank you in advance.
On-Page Optimization | | Optimal_Strategies0 -
Combine poorly ranking pages into a single page?
I'm doing on-page optimizations for an apartment management company, and they have about seven apartments listed on their site. Rather than include everything on the same page - /apartments/apartment-name/ - they have the following setup: /apartments/apartment-name/contact /apartments/apartment-name/features /apartments/apartment-name/availability /apartments/apartment-name/gallery /apartments/apartment-name/neighborhood With very few exceptions, none of these pages appear to rank for anything, and those that do either rank very poorly for seemingly random keywords or for keywords like the apartment complex name (alongside the main landing page for the complex). I'm of the mind to recommend combining the pages into a single one that contains all the info, eliminates the chances for duplicate content (all of the neighborhood pages contain the same content verbatim), and prevents keyword cannibalization. Thoughts? Thanks.
On-Page Optimization | | Alces1 -
More Singular KW Targeted Landing Pages vs. Less Multiple KW Targeted Landing Pages
So my question is... I have a adopted a site which currently ranks quite well for some industry competitive keywords with a number of poor quality landing pages which specifically target a singular keyword. I am wondering if its worth merging some of these pages together into one authoritative, better quality landing page targeting multiple keywords (as the intent for some of these keywords are largely the same). What i don't want to do is jeopardise the existing rankings in doing so. The alternative option would just be to improve the content on the existing landing pages without merging. What are peoples thoughts on this? Are there any positive case studies out there where merging has had a positive effect? Any help would be great. Regards,
On-Page Optimization | | NickG-1231 -
Removing & redirecting old pages
Hi In the case of an e-commerce store when you remove/delete an old sub department page because you no longer sell the products that page was for can you/should you redirect it to its parent main category/dept page first or just delete and let become a 404 ? Being a sub department it is obviously closely related to the main category/dept but seem strange to 301 it since its not really moved permanently to that page but i hear that's what people do to transfer that pages authority before deleting it so its not lost cheers dan
On-Page Optimization | | Dan-Lawrence0 -
301 Redirect from .html
Hi there, Following on from this post:
On-Page Optimization | | finelinewebsolutions
http://moz.com/community/q/help-with-duplicated-content Please could one confirm that using the following code in our htaccess file will stop the duplicated content issue we are having. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+.)+html?\ HTTP
RewriteRule (.+).html?$ http://www.bereavementstationery.co.uk/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html Kind Regards Alec0 -
Which is better, a directory 301 redirect or each page in the directory?
A customer of mine has a site with lots of articles and they are all quite spammy. They have not been affected by penguin yet so they asked what to do. I suggested losing the articles directory and 301 redirect to either the home page or another important page. Would a 301 redirect on the entire directory to a single page be the way to go or add redirects from each page within the directory and spread out redirects to various pages in website? Or do you have a better suggestion?
On-Page Optimization | | anthonytjm0 -
Why some pages are not indexed?
I have a furniture´s ecommerce. When searching for "site: movstore.com.br" returned 1080 results, but if I search for "site: movstore.com.br / Product" returned 1020 results. I mean, that 1080 indexed pages, 1020 are products pages and the other 60 pages are irrelevant. Where are the category pages? "site: movstore.com.br / Categories" - 0 results
On-Page Optimization | | maisempresas
"site: movstore.com.br / Departments" - 0 results
"site: movstore.com.br / Marks" - 0 results What might be happening?0 -
Linking Back to the Same Page
What are the other seo's opinions on linking the same keyword you are targeting lets take an example like Trampolines. So we have a Online shop selling trampolines would you feel it a good or bad thing to link the keyword trampolines from the homepage to the homepage almost creating a loop. Some SEO's say yes some say no ?
On-Page Optimization | | onlinemediadirect0