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
-
Should I change our main category pages to product listing pages?
With the thought of improving user experience, as well as rankings in Google, I'm considering changing our main category pages to product listing pages (with sub-categories remaining, still). These main category pages are very standard and don't link to any informational content, such as buyers guides, etc. What's driven this is the latest Google core update. I've noticed our main competitor (who we were out-ranking before... but not now) now uses this approach. I can see the benefit from a user perspective, i.e. less clicks to reach products. What's the pros/cons from an SEO point of view, please? Could the potential duplication of content be an issue? For context, we have about 2,000 products and website is on Magento 2.
On-Page Optimization | | alifeofjoy1 -
We recently updated a large guide that takes the place of the original. The original has some nice organic traffic to it and I don't want to risk losing it. Should I 301 redirect to the new version, or update all the info directly on the original page?
We don't have a lot of content that garners much non-branded organic, so this is something I don't want to risk losing. We do not have a whole lot of external links into the page either.
On-Page Optimization | | AFP_Digital1 -
Should I add canonical links to pages that are redirected?
Hello! I am a little confused concerning canonical links. I have several URLs that all access my page, but I redirect them all. A lot of places I am told to redirect them or use canonicals. Other places, I read that I should always use canonicals. What is the right way for me? If I should use canonicals as well as redirects, which links should I do this on? I redirect my pages like this: http to https:
On-Page Optimization | | hermanok
http://example.com -> https://example.com www to non-www:
https://www.example.com -> https://example.com Remove trailing slashes
https://example.com/ -> https://example.com Would-be 404-requests to index.php?p=$1
https://example.com/home -> https://example.com/index.php?p=home ( show as https://example.com/home ) Example:
http://www.example.com/home/ -> http://www.example.com/home/ -> https://example.com/home/ -> https://example.com/home -> https://example.com/index.php?p=home ( shows as https://example.com/home ) Thank you!0 -
Temporary redirections
Hi all, after crawling my website the SEOMOZ software has warned me about temporary redirections like these: What should I do? What consequences could it have in the SERPSs? Thanks. http://www.tarifakitesurfcamp.com/campamento-bilingue-para-ninos/
On-Page Optimization | | juanmiguelcr
http://www.tarifakitesurfcamp.com/campamento-bilingue-para-ninos/
http://www.tarifakitesurfcamp.com/error-404 http://www.tarifakitesurfcamp.com/campamento-de-kitesurf/
http://www.tarifakitesurfcamp.com/campamento-de-kitesurf/
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/condiciones-generales/www.tarifakitesurfcamp.com
http://www.tarifakitesurfcamp.com/condiciones-generales/www.tarifakitesurfcamp.com
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/en/about-tks/www.giselapulidoprocenter.com
http://www.tarifakitesurfcamp.com/en/about-tks/www.giselapulidoprocenter.com
http://www.tarifakitesurfcamp.com/en/page-not-found/ http://www.tarifakitesurfcamp.com/gisela-pulido-escuela/www.giselapulidoprocenter.com
http://www.tarifakitesurfcamp.com/gisela-pulido-escuela/www.giselapulidoprocenter.com
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/ENCLAVE_3.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/ENCLAVE_3.jpg
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/MATERIAL_KITE_3.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/MATERIAL_KITE_3.jpg
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/campamento-kitesurf-orca.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/campamento-kitesurf-orca.jpg
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/expertos2.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/expertos2.jpg
http://www.tarifakitesurfcamp.com/error-404/ http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/gisela.jpg
http://www.tarifakitesurfcamp.com/wp-content/uploads/2013/02/gisela.jpg
http://www.tarifakitesurfcamp.com/error-404/0 -
On-page Optimization empty
My website is new. My On-page Optimization (Reports Updated: 1/2/13) is empty. Is there a problem, I have to wait longer or am I doing something wrong? Thanks
On-Page Optimization | | franzneves0 -
How much SEO value does a fashion site get from bolting text onto the bottom of home page? Does the value compensate for cluttering up a page focused on an iconic image?
Getting ready to launch a completely redesigned site for a fashion designer. Since it is a fashion site, visitors do not need text to describe what the site is about., We are weighing three options: 1) clean design with no text (just images and navigational links), 2) bolting on a couple of sentences of text at the bottom of the page to signal keyword terms to the search engines, 3) following the lead of the top ranking site in the category and adding lots of text to the bottom of the page. Do the SEO benefits justify cluttering up the design by bolting text onto the bottom of the home page, and if so, how many characters of text seem to be the minimum to be effective?
On-Page Optimization | | RandyP0 -
Too many on-page links
I manualy counted the links on my website http://www.commensus.com which came to around 50, but SEO moz says I have over 100 and google isn't seeing them all.
On-Page Optimization | | jawl44630