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
-
Page title contents
In my page title, I have my product name. Is it beneficial to also include another keyword like: Buy wedding dress online Australia: e..g. (page title) amelie wedding dress | buy wedding dress online Australia. Or is it better just using: Amelie wedding dress
On-Page Optimization | | CostumeD0 -
Finacial pages markup
I was wondering if there is away to use Schema for stock market pages?
On-Page Optimization | | ciznerguy0 -
Page 2 is ranking
Hey All, I'm working on a wordpress site project and in analytics the sites ranking url is page 2. is this a problem?
On-Page Optimization | | CobraJones950 -
Too Many On-Page Links
Hello. So, my SEO team has worked very hard to finally resolve RogerBot/GoogleBot specific Crawl Errors either manually or programmatically can be fixed for our Budget Blinds USA Pro Campaign. We've done a good job even if a lot of it came from Robots.txt file entries as this was the most efficient way our client chose to do it. Good news is most of it is CMS configuration and not bad site architecture. That being said our next big volume of Crawl Errors is "Too Many On-Page Links". Our Moz DomainRank is 61. Our client, on this new version of the website, added a large nav-based footer which has duplicate links from the Header Main Navigation. I believe our solution is to put in No-Follow Metatags at the Footer Link Level, so we don't zap Page Authority by over-dividing as you recommend. Is this the best way to resolve this? Is there any risk in this? Or is a 61 DomainRank high enough for RogerBot and GoogleBot to crawl these anyway? Please advise,
On-Page Optimization | | Aviatech0 -
Wordpress pages URL's redirection.
I was checking W3C Markup Validation and in report it was shown that that pages (not post or any other URL's just PAGES) at investmentcontrarians.com are 301 redirected. e.g. original URL "http://www.investmentcontrarians.com/debt-crisis" which is redirected to "http://www.investmentcontrarians.com/debt-crisis/" I know that its not that serious issue, but still want to know why only pages are being redirected and how can we avoid it.
On-Page Optimization | | NumeroUnoWebSolutions0 -
Removing OLD pages
Dear all, I was removing tons of old pages from my directory (about 400 pages), I was setingup a 404 custom page, all is fine, so when I go to an existing page I get a 404 and redirected to my 404 page. The problem is Google Webmaster tools list all these pages as 404, and never clean my list (1 year til now), so I assume something is wrong. Question what is the best way or natural to remove old pages from one directory? Note: previously I tryed add on these pages the NOINDEX/NOFOLLOW meta tag and I got from google Soft-404. Thank you
On-Page Optimization | | SharewarePros0 -
SSL Necessary on Every Page?
Our ecommerce site is currently set up with an SSL on each page. My understanding is that these would need to be removed on the pages that I'd like a 301 redirect to be placed on. As of now, we have 302s due to the SSL. Do I need an SSL on every page or just the checkout pages? Any real benefit to having the SSL on every page?
On-Page Optimization | | NiallTom0 -
Should I use a Page Name variable after the ? for a dynamic web page
I'm converting for static to dynamic web pages. It appears that the page name is used for page ranking in the search engines. Will adding a Page Name variable help to increase our SEO. For example aspecialgift.com/subcat.php?PageName=GiftPage&ProductID=ABCDE. Does the page name variable make a difference?
On-Page Optimization | | NCBob0