HTTPS 301 Redirect Question
-
Hi,
I've just migrated our previous site (siteA) to our new url (siteB) and I've setup 301 redirects from the old url (siteA) to the new (siteB). However, the old url operated on https and users who try to go to the old url with https (https://siteA.com) receive a message that the server cannot be reached, while the users who go to http://siteA.com are redirected to siteB.
Is there a way to 301 redirect https traffic?
Also, from an SEO perspective if the site and all the references on Google search are https://siteA.com does a 301 redirect of http pass the domain authority, etc. or is https required?
Thanks.
-
Hi Jonathon,
Below is what I have in my htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] -
I don't know if you admin your own server, but if you do, you should be able to easily tell it to redirect HTTP to HTTPS. I do this with Apache (it's much easier and faster than .htaccess) and it works really well.
-
Hi Jonathon,
If the one I posted above doesn't work, try this one:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*) https://www.newsite.com%{REQUEST_URI} [R=301,NC]Both should do exactly what you want, but let me know how you go!
Cheers,
David
-
Hi David,
Thanks.
the htaccess for the site currently looks like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.oldsite.com$ [NC]
RewriteRule ^ https://www.newsite.com%{REQUEST_URI} [R=301,L]
The end goal would be to redirect:
To the new url:
Thanks for your help.
-
Hi Jonathon,
I did this recently and used the following in my htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^oldsite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.oldsite.com$
RewriteRule (.*)$ https://www.newsite.com/$1 [R=301,L]It redirects http and https to the new domain.
Is this what yours looks like? Can you copy and paste what you are using in your htaccess file so we can check it out? (use oldsite/newsite - don't need to give us the domain)
Cheers,
David
-
Hi,
Sorry I may not have explained the issue well enough.
I'm still looking to use https.
I simply want to redirect https://oldsite.com (and http://oldsite.com) to https://newsite.com, but I can seemingly only redirect http traffic with a 301 redirect in the htaccess file.
Thanks.
-
Google recommends using https (https://webmasters.googleblog.com/2014/08/https-as-ranking-signal.html). Is there a reason why you no longer wish to utilize it?
Otherwise, this might work for your redirect: http://stackoverflow.com/questions/8371/how-do-you-redirect-https-to-http
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
-
Irrelevant backlinks - will 301 redirect cleanse the relationship?
My client has thousands of clients for whom they provided websites that used to reside in a subdirectory of their own domain. They moved them to their own domains but there are tens of thousands of backlinks on those sites pointing back to the original domain. Those backlinks are completely irrelevant and are probably hurting them by sending the wrong signals to Google on what this site really is about. My question is will the 301 redirect be enough to cleanse the relationship between my client and all their clients' sites or should I ask the client to clean up all those backlinks on their clients' sites and remove their domain from the target urls? That's a huge job, obviously.
Intermediate & Advanced SEO | | katandmouse0 -
Multilingual Site and 301 redirection
Hey there awesome people of Moz I have this site that has many languages in it. The main language is English and my developer did the following www.example.com ( is the main site ) which redirects with a 301 to www.example.com/en if your geo location is supported by our languages then you will automatically be redirected to whatever language you have in your country but does the first language with is english have to 301 redirect to www.example.com/en ? I thought that the right way is to just leave /en at the root file. Thanks in advance
Intermediate & Advanced SEO | | Angelos_Savvaidis0 -
Removing 301 redirect from 2.5 yr old domain
Hello, Need Advise. We are in Automobiles We have an Automotive site - build 3 yrs back - which is our main site (Site A) We built a separate niche site on Used cars 2.5 yrs back (Site B - url http://www.usedcarindelhi.com) - did seo - promote it for a year and later on in feb 2013 - did 301 domain redirection to Site A Now - we thinking to rebuild Site Site B again and remove redirection Will there be any harm on Site A, as we have now removed the redirection or shall we pass on link from home page of Site B to Site A i.e say Powered by Site A (on Top) or at all no direct linking is actually needed. PS :- Also - can anyone let know the backlink quality of www.usedcarindelhi.com. Its PR 3, DA - 18, Majestic Citation Flow - 18, Trust Flow - 11 . Pl advise
Intermediate & Advanced SEO | | Modi0 -
301 Redirecting from Static to Dynamic URLs. I think we messed up
I'm looking for some guidance on an issue I believe we created for ourselves and if we undo what we did. We recently added attributed search to our sites. This of course created a bunch of dynamically generated URLS. For various reasons, it was decided to take some of our existing static URLs and 301 redirect them to their dyanamic counterpart. Ex .../Empire-Paintball-Masks-0Y.aspx now redirects to .../Paintball-Masks-And-Goggles-0Y.aspx?Manufacturer=Empire Many of these stat URLS had top 3 rankings for their associated keywords. Now, we don't rank for anything. I realize that 301 redirecting is the way to go...if you NEED to. My guess is our drop in keyword ranking is directly tied to what we did. I'm looking for an solid argument to be made to my boss as to why we should not have done this and that it, more than likely has resulted in dropped keyword rankings and organic traffic. I welcome any input. Also, if we decided to revert back (remove all 301 redirects and de-index all dynamic URLS), what is the likely hood we can recapture some of this lost organic traffic? Can I disallow indexing in a robot.txt file to remove, say anything with a '?' in the URL? Would the above URL example (which was ranking in the top 3 in SERPs), have a good chance of finding its way back? thanks
Intermediate & Advanced SEO | | Istoresinc1 -
Redirection question
How would I redirect this URL: http://www.members.mysite.com/ to this URL: http://www.mysite.com/ ? I cant figure it out
Intermediate & Advanced SEO | | JohnPeters0 -
"Starting Over" With A New Domain & 301 Redirect
Hello, SEO Gurus. A client of mine appears to have been hit on a non-manual/algorithm penalty. The penalty appears to be Penguin-like, and the client never received any message (not that that means it wasn't manual). Prior to my working with her, she engaged in all kinds of SEO fornication: spammy links on link farms, shoddy article marketing, blog comment spam -- you name it. There are simply too many tens of thousands of these links to have removed. I've done some disavowal, but again, so much of the link work is spam. She is about to launch a new site, and I am tempted to simply encourage her to buy a new domain and start over. She competes in a niche B2B sector, so it is not terribly competitive, and with solid content and link earning, I think she'd be ok. Here's my question: If we were to 301 the old website to the new one, would the flow of page rank outperform any penalty associated with the site? (The old domain only has a PR of 2). Anyone like my idea of starting over, rather than trying to "recover?" I thank you all in advance for your time and attention. I don't take it for granted.
Intermediate & Advanced SEO | | RCNOnlineMarketing0 -
Redirect 301 or Canonical.
Hello all, I have a page with a long post title and url path name (more than 70 caracters and 115). This page has many visits but I am changing the SEO website structure according to SEOMOz and forums guidelines so: I WILL CREATE A DUPLICATE PAGE WITH THE SAME INFO. This issue has been marked as an issue in the SEO tools, for long names>70 and url path names>115 My question is which option should I use and you would recommend me? 1. OPTION 1: Ideally I would like to keep the old post, so I should use the canonical tag, but my main concern is if the search engines in terms of SEO, even the canonical has been done, will penalise my SEO as there is still a post with bad SEO optimising, or if this is not the case because I already used the canonical. 2. OPTION 2: Eliminate the post and redirection 301 to the new page to keep the juice. I would prefer option 1, as I keep both post and page, but only if searchengines do not penalise my SEO as they detect a long post name and url path name. Thank you verty much, Antonio
Intermediate & Advanced SEO | | aalcocer20030 -
Analytics Question?
Is there a way to see in GA traffic from other IP address's. I want to subtract all the times I visit the site from my IP and get a real traffic %.
Intermediate & Advanced SEO | | SEObleu.com0