301 Redirects
-
Hi,
I have switched my site from a http .co.uk site to a https .com site. I have set a 301 redirect in the .htaccess file pointing all traffic going to the original .co.uk site to go to the new https:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^up-bus.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.up-bus.co.uk$
RewriteRule ^(.*)$ "https://www.up-bus.com/$1" [R=301,L]however when i search in google for keywords the original .co.uk site is still registering in search, is there something else I am required to do to tell google to use the new https site instead? Do i need to do redirects for every page, or is what I have done above sufficient?
Hope you can help, I am struggling with getting our site to register on google search, any advice greatly welcome
Thanks in advance,
Ian
-
Thanks Robert. All done
-
Ian, Make sure you added your HTTPS version into WMT (search console) and also choose www as preferred domain. Rewrite is fine.
-
Hi Robert,
thank you for your response made the change around a month ago. Be great if your apache expert had a perfect re-write rile for this, let me know if you hear of anything
Thanks again,
Ian
-
I would speak to your hosting provider it is not a big deal but here are the layouts of what you need to do essentially.
I hope these answers are helpful some of them are mine some of them are other people that definitely know what they're doing. Robert and Ryan are smart guys as well and listen to what they say.
https://moz.com/community/q/site-migration-and-traffic-help
https://www.deepcrawl.com/knowledge/best-practice/the-zen-guide-to-https-configuration/
https://yoast.com/dev-blog/move-website-https-ssl/
https://www.youtube.com/watch?v=ekvnE4YMeyM#t=23m08s
#Force www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
#Force non-www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
More
https://www.deepcrawl.com/knowledge/tag/https/
I hope this helps,
Tom
-
Ian,
First with the change to .com read what Ryan wrote and follow the change of address steps.
How long ago did you make the change?
Take a look at these common problems on HTTPS switch by Cyrus Shepard a year or so ago and see if you have more work to do. (Mistakes are roughly a third of the way down.)
I will follow the question and am checking our Apache expert re the perfect rewrite rule for this. If he is not on a 100 mile bike ride I should hear from him shortly. Otherwise, maybe tomorrow. I will PM you worst case.
Best
-
Hi Ian. You can go to Google Search Console, register your ownership of both domains, then go into the gear settings for .co.uk and select "Change of Address" and supply the .com domain. That's one step in the process that can help speed up the change.
Another is changing from the old address to the new in as many locations as practical where you were linked from the old one. As Google constantly crawls the web it will also notice these changes and add them to the list that says your .co.uk site is now on the .com. Places include social profiles, business listings, reviews--pretty much any place online where your site interacts.
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
-
Resolving 301 Redirect Chains from Different URL Versions (http, https, www, non-www)
Hi all, Our website has undergone both a redesign (with new URLs) and a migration to HTTPS in recent years. I'm having difficulties ensuring all URLs redirect to the correct version all the while preventing redirect chains. Right now everything is redirecting to the correct version but it usually takes up to two redirects to make this happen. See below for an example. How do I go about addressing this, or is this not even something I should concern myself with? Redirects (2) <colgroup><col width="123"><col width="302"></colgroup>
Technical SEO | | theyoungfirm
| Redirect Type | URL |
| | http://www.theyoungfirm.com/blog/2009/index.html 301 | https://theyoungfirm.com/blog/2009/index.html 301 | https://theyoungfirm.com/blog/ | This code below was what we added to our htaccess file. Prior to adding this, the various subdomain versions (www, non-www, http, etc.) were not redirecting properly. But ever since we added it, it's now created these additional URLs (see bolded URL above) as a middle step before resolving to the correct URL. RewriteEngine on RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Your feedback is much appreciated. Thanks in advance for your help. Sincerely, Bethany0 -
Ranking for non-existing content which is 301 redirected
Hey there, In the beginning of this year I've made complete site migration from Dutch language to English. All the old Dutch URL's were 301 redirected to the English versions. I naturally lost rankings for all Dutch keywords during the next month. On the website there is no Dutch content anymore. But what happened now is that five months later the website started to rank for the Dutch keywords again. The page snippets in SERP are in English but the URL's shown are in Dutch (ending with .nl) and whenever a user clicks on the snippet he/she gets 301 to the correct English version. Any ideas what could be the reason for re-ranking of non-existing pages which gets 301 in SERP?
Technical SEO | | benesmartin0 -
301 redirect file question
Hi Everyone, I am creating a list of 301 redirects to give to a developer to put into Magento. I used Screaming Frog to crawl the site, but I have noticed that all of their urls 302 to another page. I am wondering if I should 301 the first URL to the url on the new site, or the second. I am thinking the first, but would love some confirmation. Thank you!
Technical SEO | | mrbobland0 -
301 redirect from Blogger
Hello, I have a client with a Wordpress network of blogs, each blog is owned by a different blogger. Many of them were migrated time ago from Blogger. I have seen that the way used to redirect them is a meta refresh, so no authority is being passed. I cannot find any reliable way of making a 301 from Blogger, There are some plugins, but I'm afraid of using them. Any of you have experience with this situation please? I have even thought about placing a global rel canonical before the meta refresh, but I think that here the problem is the meta refresh itself.... Thank you in advance
Technical SEO | | Juandbbam0 -
301 how?
My website is www.photosbykristopher.com, but I have some important links pointing to photosbykristopher.com How do I get my domain without the www to redirect to the domain with the www. PS I use Go daddy for hosting.
Technical SEO | | KristopherWho0 -
Switching from a .org to .io (301 domain redirect)
I'm considering switching my main site from a .org to .io address; the .org is an exact match domain which helped to kickstart it a few years ago and now has about 50% repeat visitors, but was thrown off the Apple affiliation program for trademark infringement. I've found and purchased a nice (non-infringing) .io domain, and I've read the advice here on how to properly 301 the old domain; but my question is - does it matter that it's .io? Is this going to significantly hurt my rankings, even when everything has been 301'd properly? Another thought I had is that I may actually come out better off in the long run, what with Google penalties being applied to exact match domains. Is this a ranking suicide? If so, I'm tempted to leave it as is; even without the affiliation, it's making a good amount every month in ad fees that I don't want to disrupt. Thanks all!
Technical SEO | | w0lfiesmithUK0 -
301 redirects
At the moment it's possible to access the home page of my website via two different urls, with and without www. and you've told me that this can be resolved with Canonicalization and a 301 redirect. Do I do this with my web hosting package or in my html pages? If I can't do it with my web host (1&1) then is there an idiot's guide of how to do it yourself? I've also got both the domain vamospaella.co.uk and vamospaella.com. Is it better to have one of these redirecting to the other for UK traffic (at the moment .co.uk redirects to .com) Thanks
Technical SEO | | melissa10 -
301 redirects and OSE
We run a blog/video real estate site (yochicago.com) as one of the venues for sponsored content for our clients looking for off-page SEO and inbound links. I'm working with a client who we've linked to a handful of times in the last few weeks, but I'm not seeing any external links from our site on PRO/OSE. Come to find that our writer has been linking to http://clientsite.com, instead of http://www.clientsite.com, which is the canonical site. I wouldn't have thought that this would make a difference, and about an hour of web research seems to confirm that it shouldn't make a difference, save for losing a little bit of SEO credit. What am I missing? Any input would be appreciated.
Technical SEO | | mikescotty0