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.
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
-
How to Optimize Multiple Listing Pages
Hello Webmasters, How can I optimize a site having a listings which creates various multiple pages? e.g: Pages like below: http://moz.com/blog?page=2 http://moz.com/blog?page=3 etc I want to optimize meta tags of these pages. If i put common title and description. My moz analysis showing duplicate meta tags and duplicate description issues. Please guide me to optimize these type of pages.
On-Page Optimization | | wmsindia0 -
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 -
What if Paginated Pages all have PageRank?
Paginated Pages, page 2,3,4 etc.... they aren't supposed to have a PageRank, right? If they are only linked to from themselves, only the original page, Page 1, is supposed to be showing PageRank? I'm trying to double check that I am handling this right. I'm not using canonical, or noindex or any of that... just using rel next and prev, which I thought would be fine. Thoughts?
On-Page Optimization | | MadeLoud0 -
Redoing a site - 404 redirect or 301 redirect
I'm redoing a website, should i 404 the old pages, or 301 redirect to the main page? what is better? (around 100 pages)
On-Page Optimization | | mkmedia0 -
Product page optimalisation
Throughout the years our website kept on growing this has led to product pages that have so much sub-pages that nobody is able to really get a good idea of the product. We are working on a new website where the visitor is central. Together with a usability partner we have down sized the preferred data to fit on one page with a tabular system with a maximum of 4 taps. My question will this affect our find ability if we go from 10 to 15 sub-pages to one main page
On-Page Optimization | | TiasNimbas0 -
Optimize Page Title - Advice
I am currently going through my site and re-doing the page titles to try and optimize each specific product's page. I know that having the part number as the first piece of text in the title is the best practice. My question is, if i add a bunch of terms to the title, after the part number, is that taking away from the important part (the product number)? For example, my product is Audi A4. The term i want to optimize for is Audi A4. Which would be the better title for ranking purposes? A) Audi A4 | Automobile or B) Audi A4 | Automobile | 4 Cylinder | Made in Germany Thanks for the advice!
On-Page Optimization | | Prime851 -
Anchor text landing page
do you think google counts the H1 of the landing page from an anchor text, for example if the anchor text of my product is . blue sexy X, do you think its good if the h1 of the landing page says the exact same thing
On-Page Optimization | | Dirty0 -
Should one page with markers or six separate pages?
Hi - I'm working on a site that was set up with 6 bios on one page, with markers jumping to each person's name. I was thinking about separating those into 6 different pages, but not sure if that's the right thing to do. Advice about keeping the bios on one page vs splitting them up? (Am I more likely to rank for those peoples' names if I have a unique page, or is the one page url with each different marker in it, just as good?) Ranking well for those names isn't a huge goal of the site, but it would be nice to make the choice that would help with that rank. Thanks for your input Emma
On-Page Optimization | | emmas0