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
-
What would you do about this Pillar Page conundrum?
I am re-organizing site structure for an e-commerce site. Here's the problem I have: The product (shipping container) is available to BUY and HIRE in four sizes, for example a 20ft container is one of them. Now, should I have a 20ft container product page for buying -- and also a 20ft container for hiring? I want the container sales and seperate container hire page to be pillar pages, if I don't have any cluster pages for the different container sizes below them it I'm worried it'll just be floating out there in the ocean while the sales page gets all the cluster love. At the same time I don't want to have something that looks like duplicate content with 20ft hire and 20ft sale page. Any ideas please?
On-Page Optimization | | scjames0 -
Hiding elements of the page
Hi, Does hiding elements of the page have a negative effect on SEO? The reason I ask is I am using a Wordpress theme however in options if I disable a certain element of the theme that is printed on the page it simply hides it from the user using CSS but it still exists in the code. Could the search engine see this as bad? E.g. like you are trying to keyword stuff by hiding keywords in the page? Thanks.
On-Page Optimization | | mdeluk1 -
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 -
Duplicate Home Page
Hi, I have a question around best practise on duplicate home pages. The /index.aspx page is showing up as a top referrer in my analytics. I have the rel=canonical tag implemented for the www.mysite.com on both pages. Do I need to 301 the /index.aspx to the mysite.com? I have a lot of links pointing to the /index.aspx (half of those are coming from the mysite.com). www.mysite.com/index.aspx www.mysite.com Many thanks Jon
On-Page Optimization | | JonRaubenheimer0 -
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 -
Redirecting URLS on windows
Could anyone help out here please. A client of ours have reveloped their website from HTML to ASP (helpful!). They have 60 odd pages indexed in Google with the .html extension. We need to do a redirect on these pages so that all link juice is passed to the new pages. What would be the best way to do this please?
On-Page Optimization | | Grumpy_Carl0 -
301 redirects from several sub-pages to one sub-page
Hi! I have 14 sub-pages i deleted earlier today. But ofcourse Google can still find them, and gives everyone that gives them a go a 404 error. I have come to the understading that this wil hurt the rest of my site, at least as long as Google have them indexed. These sub-pages lies in 3 different folders, and i want to redirect them to a sub-page in a folder number 4. I have already an htaccess file, but i just simply cant get it to work! It is the same file as i use for redirecting trafic from mydomain.no to www.mydomain.no, and i have tried every kind of variation i can think of with the sub-pages. Has anyone perhaps had the same problem before, or for any other reason has the solution, and can help me with how to compose the htaccess file? 🙂 You have to excuse me if i'm using the wrong terms, missing something i should have seen under water while wearing a blindfold, or i am misspelling anything. I am neither very experienced with anything surrounding seo or anything else that has with internet to do, nor am i from an englishspeaking country. Hope someone here can light up my path 🙂 Thats at least something you can say in norwegian...
On-Page Optimization | | MarieA1 -
Too many links on a page?
On my blog posts, I have links to all the categories and months, dating back 5-6 years. This make the number of links on each blog page well over 100, which I understand might decrease the value of each page. Is there a problem with having more than 100 links on a page?
On-Page Optimization | | rdreich492