Http -> https redirections / 301 the right way
-
Dear mozers,
Thank you for your time reading the message and wanting to help!
So, we have moved our WordPress to https and redirected all the content successfully via htaccess file.
We used a simple 301 redirect plugin, which we are using to redirect old URLs to the new ones.
The problem today is, the redirections in the plugin are not working for http version. Here is an example:
htaccess redirect:
http --> https
Plugin redirect
domain.com/old --> domain.com/new
but, the url http://domain.com/old is not redirecting to https://domain.com/new
while
https://domain.com/old does redirects to https://domain.com/new
What can you suggest as a solution?
Thank you in advance!
P.S. I don't think having 2 redirects for each version of the URL is the smartest solution
Best wishes,
Dusan
-
That's great news Dusan - glad you figured it out
-Andy
-
Oh, it's solved.
I forgot to say that we have switched hosting provider. From some reason it renamed our mu_plugins folder to mu_plugins_old. I have simply renamed the folded and reactivated cashing plugin, which creates the rule and writes in htaccess.
Thanks Andy for your contrubution. The links you share are useful for anyone looking for the right way of doing 301 redirections.
Cheers!
-
It sounds to me like a config issue in the .htaccess file. There is no real reason for it not to work otherwise.
See if you find your solution in here:
https://www.sslshopper.com/apache-redirect-http-to-https.html or here: http://stackoverflow.com/questions/13977851/htaccess-redirect-to-https-www
-Andy
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
-
Removing Multiple 301 Redirects
During my last redesign (and migration to Drupal) some of the updated SEO friendly url's on the new site were misspelled. Rather than updating the 301 redirects to point to the correct page the developer just added an additional 301 redirect. So it was redirected like this website.com/oldpage (301 to) website.com/new-paige (301 to) website.com/new-page Instead of website.com/oldpage (301 to) website.com/new-page I'll be finishing another redesign and updating to https soon, should I remove the redirect to the misspelled domain and just have one 301 from the original page? These multiple redirects have been up for over a year. Thanks for any specific advice!
Technical SEO | | talltrees0 -
Http://newsite.intercallsystems.com/vista-series/sales@intercallsystems.com
I keep getting crawl errors for urls that have email addresses on the end. I have no idea what these are. Here is an example: the-audio-visual-system/sales@intercallsystems.com Where would these be coming from, how are they created? How can i fix them? When I try to do a 301 redirect it doesn't work. Thanks for your help,
Technical SEO | | renalynd27
Rena0 -
Google indexing staging / development site that is redirected...
Hi Moz Fans! - Please help. We had a acme.stagingdomain.com while a site was in development, when it went live it redirected (302) to acmeprofessionalservices.com (real names redacted!!) no known external links to staging site although staging site url has been emailed from Google Apps(!!!) now found that staging site is in the index even though it redirects to the proper public site. and some (but not all) of the pages are in the index too. They all redirect to the proper public site when visited. It is convenient to have a redirect from the staging site to the new one for the team, Chrome etc. remember frequently visited sites. Be a shame to lose that. Yes, these pages can be removed using webmaster tools.
Technical SEO | | mozroadjan
But how did they get in the index to start with? And if we're building a new site, and a customer has an existing site is there a danger of duplicate content etc. penalties caused by the staging site? We had a similar incident recently when a PDF that was not linked anywhere on the site appeared in the index. The link had been emailed through Google Apps, and visited in Chrome, but that was it. So 3 questions. Why is the staging site still in the index despite the redirects? How did they get in the index in the first place? Will the new staging site affect the rank of the existing site, eg. duplicate content penalties?0 -
Google showing https:// page in search results but directing to http:// page
We're a bit confused as to why Google shows a secure page https:// URL in the results for some of our pages. This includes our homepage. But when you click through it isn't taking you to the https:// page, just the normal unsecured page. This isn't happening for all of our results, most of our deeper content results are not showing as https://. I thought this might have something to do with Google conducting searches behind secure pages now, but this problem doesn't seem to affect other sites and our competitors. Any ideas as to why this is happening and how we get around it?
Technical SEO | | amiraicaew0 -
What is the best way to change tons of 302 for 301...
I'm doing an audit for a new client and their website has tons of 302... (more than 1000)... What is the best/fast way to change all the 302 for 301...?
Technical SEO | | Felip30 -
301 redirects - one overall redirect or an individual one for each page url
Hi I am working on a site that is to relaunch later on this year - is best practise for the old urls (of which there are thousands) to write a piece of code that will cover all of the urls and redirect them to the new home page or to individually redirect each url to its new counterpart on the new site. I am naturally concerned about user experience on this plus losing our Google love we currently have but am aware of the time it would take to do this individually. Any advice would be appreciated. Thanks
Technical SEO | | Pday1 -
Will a timed 301 redirect work for Googlebot?
Our client is changing brand names and domain names. We know we need to 301 redirect the old domain, but for marketing reasons we want people to see a short message saying that the brand has changed and that they will be redirected. Example: | | Our concern is how, or if, Googlebot will intepret the redirect. Will this accomplish our SEO objective of moving the value of the page to the new domain, or do we need to do just a plain old fashioned 301 redirect and not even let the page load? Thanks for your help.
Technical SEO | | GOODSIR0 -
301 redirects
Hi, I am a working on a new web site, and I want to redirect all the urls of another site (on a different host) to this one. According to both hosts it is "impossible" to do this for all urls. I don't believe that to be the case, but how do I do this? And, should both sites be hosted on the same server first?
Technical SEO | | vibelingo0