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
-
Shifting target keyword to a new page, how do we rank the internal page?
I have been targeting one keyword for home page that was ranking between the postilion 6-7 but was never ranking on 1st as there were 2 highly competitive keywords targeted on the same page, I changed the keyword to an internal service page to rank it on 1st, I have optimized the content as well but the home page is still ranking on 11th, how do I get the internal page rank on that keyword
On-Page Optimization | | GOMO-Gabriel0 -
Too many links per page? Double navigation on every page...
I have a client with navigation across the top of each page plus the same nav links in a sidebar on every page. Can that duplication (or the sheer number of links) on each page have a negative ranking factor?
On-Page Optimization | | brm20170 -
Content for the Home Page
Hi All, I have a Videos website which contains Videos of all types + Family safe type... The home page has sections and Videos listed. Now for SEO purpose i need to have content? this is what i read in most places. What is the kind of content i can place on a Videos website Home page? I can write about a Movie or actor but that content on Home page would that be of any use? We have a About us page etc to know who we are.. Any ideas please..
On-Page Optimization | | Nettv0 -
Worth redirecting old blog posts into pages?
I'm working on a site that has some blog posts from 2011 - 2013 ranking on the first page for relevant terms. I'm going through and updating some of the content, internal links, etc., and wanted to know if it's worth redirecting some of these blog posts into new pages (in WordPress). Right now, the blog post URLs are long - exampleURL.com/2011/3/9/blog-post-title/ and the dates show up in the SERPs. I'd like to have the date removed so that the content doesn't look outdated, and I'd also like to have cleaner URLs. In your opinion, is it worth creating new pages and redirecting the old blog posts, or is the benefit of doing this not worth the effort? Thanks!
On-Page Optimization | | dchristensen30 -
Contact pages coming up for keywords above landing pages
I have two examples of contact pages coming up over designated landing pages Keyword: Nickel Alloys for www.neonickel.com Keyword: Artificial Grass for www.artificialgrass4u.co.uk Is there anyway I can stop this happening?
On-Page Optimization | | icansee0 -
Limiting On Page Links
Right now, we have about 160 or so links on the home page. It's been recommended that we keep it to under 100, though that's not as big of a deal as it once was. Is it helpful to make a bunch of those links "nofollow" in order to preserve link juice? Is it going to make a difference, or be at all helpful? I assume it won't be harmful, especially as a bunch of them are to the same page but on different sections of the page. Would live your advice and thoughts! Thanks!
On-Page Optimization | | DeliaAssociates0 -
Title tag for category page
I’d love some clarification on what would be the best title tag for a shopping category page. The category page is “prams” , the brand is Baby Huddle and the top keywords in order of importance are pushchairs, strollers and buggies. Here are the options I suggest: Buy Prams | Pushchairs, Strollers, Buggies | Baby Huddle Buy the best prams, pushchairs, strollers and buggies on Baby Huddle Buy prams with free delivery and great prices on Baby Huddle
On-Page Optimization | | walidalsaqqaf0 -
Redirect and page ranking
We used to have a good page rank of Google, but now our page rank dropped to zero. A few months ago we did a redirect from our www.???.com to non-www.???.com, because non-www.???.com is now our main website. We also have a number of other domains which we redirect to our main website non-www.???.com Do you think these redirects are causing the problem, and if so what can we do to fix it? Thanks!
On-Page Optimization | | poupette0