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
-
Can a page that's 301 redirected get indexed / show in search results?
Hey folks, have searched around and haven't been able to find an answer to this question. I've got a client who has very different search results when including his middle initial. His bio page on his company's website has the slug /people/john-smith; I'm wondering if we set up a duplicate bio page with his middle initial (e.g. /people/john-b-smith) and then 301 redirect it to the existent bio page, whether the latter page would get indexed by google and show in search results for queries that use the middle initial (e.g. "john b smith"). I've already got the metadata based on the middle initial version but I know the slug is a ranking signal and since it's a direct match to one of his higher volume branded queries I thought it might help to get his bio page ranking more highly. Would that work or does the 301'd page effectively cease to exist in Google's eyes?
Technical SEO | | Greentarget0 -
I need help with redirecting chain to another page and 301, I don't understand on how to fix
Redirect Chain <label>What it is:</label> Your page is redirecting to a page that is redirecting to a page that is redirecting to a page... and so on. Learn more about redirection best practices. <label>Why it's an issue:</label> Every redirect hop loses link equity and offers a poor user experience, which will negatively impact your rankings. <label>How to fix it:</label> Chiaryn says: “Redirect chains are often caused when multiple redirect rules pile up, such as redirecting a 'www' to non-www URL or a non-secure page to a secure/https: page. Look for any recurring chains that could be rewritten as a single rule. Be particularly careful with 301/302 chains in any combination, as the 302 in the mix could disrupt the ability of the 301 to pass link equity.” This is not helping me I don't understand about the 301 do I use the www.jasperartisanjewelry.com or the /jasperartisanjewelry.com I'm confused
Technical SEO | | geanmitch0 -
Does 301 redirect of old filenames still work?
I have gone through several revisions of my site. We used to have only static pages in HTML. I had search-engine-optimization.html changed to seo-philippines.html changed to /seo-philippines/ I 301 redirected all of them whenever I change the filenames. This is in the course of 6 years worth of link building and I'm wondering if this has an effect because our rankings go down everytime we do this.
Technical SEO | | optimind0 -
Do I need Redirects?
I've recently changed my old static website to a WordPress one. I'd like to know what do do (if anything) about my old links. For example a page on my old site was: www.iainmoran.com/corporate-magician.html - now I'm using WordPress, the url is:
Technical SEO | | iainmoran
www.iainmoran.com/corporate-magician/ My question is, do I need to set up redirects on these old pages (which no longer exist or will Google eventually re-crawl my site and update the links themselves? I'm using the Yoast SEO Plugin for WP and it creates a sitemap, which of course will have my new pages on. But don't want Google to penalise me for having broken links, etc. Many thanks, Iain.0 -
301 redirects reverting to 302 redirects
We recently built a new website with a new site structure. To prevent there being a load of 404's I redirected the old pages to the new relevant pages with 301 redirects. A few days later the SEOmoz crawl report alerted me to a load of 302 redirects. When I looked into this for some reason all of the 301 redirects I set up are reverting to 302 redirects. I did a test by 301 redirecting a made up URL to an existing page and the same thing happens - it 302 redirects. I can't find any settings in WordPress to possibly explain why this is happening. Has anyone got any ideas why this could be?
Technical SEO | | Tone_Agency0 -
302 to 301 redirect
Our site has quite a few 302 redirects that really ought to be 301's. Our IT department is really busy so the question is, given that the 302's have probably been in place for years, is it worth changing them to 301's now? Thanks
Technical SEO | | Houses0 -
301 Redirect without specifying base domain?
Hi guys, about 10 minutes ago, I finally found the underlying problem in magento between 301 redirects and canonical tags - part of the reason why it was hard to identify was because the problem is not constant through all pages. Anyway now that I found the problem, I have about 50 301 redirects to implement via .htaccess. Now I know the regular syntax is Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html But I'm wondering if there's a way that the base domain doesn't have to be specified in the second half of this line. Something like: Redirect 301 /oldpage.html /newpage.html I'm sure this can be done, somehow. Thanks!
Technical SEO | | yacpro130 -
Difference between URL Rewrites and 301 Redirects for Rankings
What is the difference between URL rewriting and 301 redirects? Specifically if my home page is rewriting the www. version and the /index.html version rather than 301 redirecting them is this equivalent? Does it still pass the link juice on those alternate variations the same way a 301 redirect will?
Technical SEO | | rcarll0