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
-
Reusing an already 301 redirected URL for a very important keyword
I have a question about reusing an already 301 redirected URL Till now I never reused an URLs that has been already redirected with a 301 redirect. However, I just started working on a website where in past they created a lot of 301 redirects without thinking about the future, and now certain URLs, that are currently redirected with a 301, would be very useful (exact match) and needed (for some of the most important keywords for this specific business), to maintain an optimal, homogeneous and "beautiful" URL structure. Has any of you ever reused a URL that was previously redirected with a 301 redirect? If yes what are your experiences with it? Can content on the reused URL (that was previously 301 redirected and than the redirect removed) normally rank if the page is reestablished and the redirect is removed (and you do great content, on page, internal linking, backlinking, .... ) or is such an URL risky / not recommended / "burned" forever and not recommended to be reused again... especially for very important keywords since it present the exact match ?! Thank you very much for all your help! Regards
Technical SEO | | moz46y0 -
301 redirected all my pages to my new domain, now I have a problem with Google Search Console
Hi guys! I bought a new domain name and redirected all my URLs from the old domain to the new one. Everything worked perfectly but now I have a little problem. I want to use the option 'Address Change' in google search console. Step 1 Works (Select new website in the list) Step 2 Works (Confirm that the 301 are working) Step 3 Asks me to Verify the old domain (huh!?) in order to complete the request. Obviously that doesn't work because my 301s WORKS! So if I try to verify the old website by putting a google file in the root of my domain Google tries to access it and it automatically redirects to the new domain. I must be missing something lol help!
Technical SEO | | benoit_20180 -
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 -
Do I need both canonical meta tags AND 301 redirects?
I implemented a 301 redirect set to the "www" version in the .htaccess (apache server) file and my logs are DOWN 30-40%! I have to be doing something wrong! AddType application/x-httpd-php .html .htm RewriteCond %{HTTP_HOST} ^luckygemstones.com
Technical SEO | | spkcp111
RewriteRule (.*) http://www.luckygemstones.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^./index.htm
RewriteRule ^(.)index.htm$ http://www.luckygemstones.com/$1 [R=301,L] IndexIgnore *
ErrorDocument 404 http://www.luckygemstones.com/page-not-found.htm
ErrorDocument 500 http://www.luckygemstones.com/internal-serv-error.htm
ErrorDocument 403 http://www.luckygemstones.com/forbidden-request.htm
ErrorDocument 401 http://www.luckygemstones.com/not-authorized.htm I've also started adding canoncial META's to EACH page: I'm using HMTL 4.0 loose still--1000's of pages--painful to convert to HTML5 so I left the / off the tag so it would validate. Am I doing something wrong? Thanks, Kathleen0 -
How do I fix a 301 Redirect Loop?
Saturday I waas doing some correcting of some duplicate titles, including nofollowing tags, etc. (my main problem was duplicate titles due to tags and categories being indexed). Now this morning I see that one of my pages refuses to load, citing a 301 redirect loop. http://www.incredibleinfant.com/feeding/switching-baby-formula/ Originally, the page was posted under the wrong category. http://www.incredibleinfant.com/uncategorized/switching-baby-formula I resaved it under the correct category (feeding) and now it won't load. Can someone help me figure out how to correct this mess? Thanks so much Heather
Technical SEO | | Gotmoxie0 -
301 redirect or 302
A client of mine has an international company named www.taxglobalizers.com if you come from Holland they 302 redirect you to the www.taxglobalizers.com/en version of the site and if you come from Holland they redirect with a 302 to www.taxglobalizers.com/nl version. I think it is best to change this in a 301 redirect. Am i correct in this? Kind Regards, Ruud
Technical SEO | | RuudHeijnen0 -
Rel - canonical vs 301 redirect
I have multiple product pages on my site - what is better for rankings in your experiance? If I 301 the pages to 1 correct version of the product page - or if I rel caanonical to the one correct page?
Technical SEO | | DavidS-2820610