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
-
Will this 301 redirects help me?
Hello, recently, I found out about all the SEO advantages from 301 redirects. I had 3 websites that are now expired, their topic was Counter Strike 1.6 servers. All of these websites were registered 9 years ago and have few good backlinks (from website with 1%-3% spam score and DA 30+). Now I have one website that is not only about Counter Strike 1.6 but also many other Steam shooter games. If I revive these 3 old domains and 301 redirect them to my new one, will it help me with SEO and increase my ranking on Google?
Intermediate & Advanced SEO | | Bonito19930 -
If I 301 redirect a sub-page that is #1, will I risk losing SERP?
I have a site that for some reason Google decided to rank one of our articles #1 for a fairly competitive term. The article is kind of a BS blog post and I want to 301 it to our page about the topic as that's designed for conversion. If I do this, will we risk losing the ranking? If so, what are other options? Can I change the content of the ranked page to something closer to our landing page? Any advice is welcome!
Intermediate & Advanced SEO | | dk80 -
301 redirect to avoid duplicate content penalty
I have two websites with identical content. Haya and ethnic Both websites have similar products. I would like to get rid of ethniccode I have already started to de-index ethniccode. My question is, Will I get any SEO benefit or Will it be harmful if I 301 direct the below only URL’s https://www.ethniccode/salwar-kameez -> https://www.hayacreations/collections/salwar-kameez https://www.ethniccode/salwar-kameez/anarkali-suits - > https://www.hayacreations/collections/anarkali-suits
Intermediate & Advanced SEO | | riyaaaz0 -
Should I redirect my HTTP to my HTTPS ?
I am about to make a domain name change for my online shop. I have heard that redirecting my HTTP to my https is a good SEO Practice. I have www, non-www, as well as https-www and https-non-www declared in Search console. Both have non-www set as preferred domain. Is the redirect rule from HTTP to https really usefull ? Thanks
Intermediate & Advanced SEO | | Kepass0 -
301 Redirects... Redirect all content at once or in increments?
Hello, I have been reading a lot about site migration and 301s and sometimes get confused with conflicting suggestions from different sources... So, in a site migration. Should I 301 redirect all old URLs to the news at once or little by little? I've see this Google handout that suggests doing it all at once (minute 13)
Intermediate & Advanced SEO | | Koki.Mourao
https://plus.google.com/u/0/events/cfco632lor7bl55j3tg1g8332l0 But also have read the opposite in other forums...0 -
301 redirect recommendations
One of our clients we are working on have two sites the main with a PR5 and a separate one with a PR4. We are planning on doing a 301 from the PR4 to a page on the PR5 Is it best to do: www.PR4.com ----> www.PR5.com/releveantPR4page or www.PR4.com/page ----> www.PR5.com/releveantPR4page Most pages on the PR4 site can fit into one PR5 page logically. However the PR4 has an about us, contact us, blog/with posts, FAQ, Applications, Legal Resources which are all pretty out dated.. The PR4 site is kinda messy and we are not sure if it will be easy to 301 each page individually with the user in mind. can we do a sitewide 301 redirect from the root PR4.com to a page PR/5.com/releveantPR4page and also do deeper 301's? PR4.com/PR4page ---> PR5.com/releveantPR4page
Intermediate & Advanced SEO | | Bryan_Loconto0 -
Redirecting, then redirecting back
Hey, mozzers! My first question ever... I have a client who has (fictitionally) WickerPatioHomeStore.com, which features wicker home decor. Not too long ago, they wanted a shorter, easier URL, so they redirected to another domain they own, WickerPatio.com (again, fictional). They saw somewhat of a drop in traffic, and wonder if there's a correlation with the words "home store" not being in their domain any more. When considering the two, I figure that relevant factors would be age of domains, history of content of the domains, and inbound links to each domain. Any thoughts on other things to consider? Thanks very much!! ~ Scott
Intermediate & Advanced SEO | | GRIP-SEO0 -
How do I set up a 301 redirect if the default settings for our web servers create multiple URLs for the same page?
How do I set up a 301 redirect if the default settings for our web servers create multiple URLs for the same page but only views it as one page?
Intermediate & Advanced SEO | | ibex0