How Can I Redirect an Old Domain to Our New Domain in .htaccess?
-
There is an old version of http://chesapeakeregional.com still floating around the web here: http://www.dev3.com.php53-24.dfw1-2.websitetestlink.com/component/content/category/20-our-services. Various iterations of this domain pop up when I do certain site:searches and for some queries as well (such as "Diagnostic Center of Chesapeake").
About 3 months ago the websitetestlink site had files and a fully functional navigation but now it mostly returns 404 or 500 errors. I'd like to redirect the site to our newer site, but don't believe I can do that in chesapeakeregional.com's .htaccess file. Is that so and would I need access to the websitetestlink .htaccess to forward the domain?
Note* I (nor anyone else in our organization) has the login for the old site. The new site went live about 9 months before I arrived at the organization and I've been slowly putting the pieces together since arriving.
-
Sorry Sean, I misunderstood your question. No, you cannot redirect any website you don't have access to. My recommendation would be to contact the host and work with them to obtain access. It's usually not a complex process.
-
Hi Brett,
I've tried the above and previously found the InMotion Hosting resource. I'm able to redirect pages on chesapeakeregional.com just fine. I believe I cannot do the above in the ches reg .htacess because the site I want to redirect from is a different domain. If I could, there wouldn't be anything to stop anyone from redirecting, say facebook.com, to their own website...unless I'm misunderstanding something.
-
There are several resources around the net that show how to do this. Here's a code snippet provided by http://www.inmotionhosting.com/support/website/redirects/setting-up-a-301-permanent-redirect-via-htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]If this doesn't work for you, here are some other resources:
https://www.internetmarketingninjas.com/blog/search-engine-optimization/301-redirects/
https://css-tricks.com/snippets/htaccess/301-redirects/
http://www.bruceclay.com/blog/how-to-properly-implement-a-301-redirect/The first code example is more canonical friendly. The simple version I see used a lot and recommended in the other resources I've provided looks like this:
RedirectMatch 301 ^(.*)$ http://www.xyz.com
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
-
Localized Domain Issue - Can I use Search Console to solve this?
Struggling through trying to resolve a complicated search issue - would appreciate any community input or suggestions. The Background Info We have several brand sites and each one has both a .ca and .com domain. For some reason, our website platform was created in a way that hundreds of pages on the .com domain have an equivalent page on the .ca domain, which are all 301'ed to the appropriate .com pages. Example below for clarity: www.domain.ca/gadget/brand - 301 Redirected to: www.domain.com/gadget/brand www.domain.ca/gadget/en/brandcanada = Proper .ca Canadian URL (where en is the language - fr exists as well) The Problem Because these .com pages exist under the .ca domain as well, they have started to outrank the correct .ca pages on Google. This has led to Canadian customers finding incorrect information, pricing, and reviews for these products - causing all sorts of customer service issues and therefore affecting our sales. I am being told that to properly fix the issue, and remove the incorrect URLs under the .ca domain would be prohibitively expensive in terms of resources, so I'm left trying to fix this via means available to me (i.e. anything but a change to how the platform is currently setup). The Attempted Fix I've submitted proper sitemaps for the .ca brand sites, and we have also created a robots.txt file to be accessed only when the site is crawled through the .ca domain. In that robots.txt, we have Disallowed crawling of any /gadget/brand/ URLs for the .ca domain. This was done a week ago and I am still seeing the .com URL show up in search results. The Question Should I be submitting any www.brand.ca/gadget/brand/ URLs to be temporarily removed from Google? Because of the 301 redirect in place from www.brand.ca/gadget/brand to www.brand.com/gadget/brand, I am hesitant to do so, as I do not want the .com URL removed. Will Google simply remove the .ca URL and not follow the 301 redirect to remove that URL as well? Any additional insight or feedback would be awesome as well.
Intermediate & Advanced SEO | | Trevor-O0 -
Backlinks from old domain
Hi, We have gone through a change of company brand name including a new domain name.
Intermediate & Advanced SEO | | Agguk
We followed google recommendations at: https://support.google.com/webmasters/answer/83106?hl=en and it seems to have worked really well, the new domain has replaced the old in the google search results. My question: Still most of our backlinks, both anchor text and links use the old brand name and domain and it´s a slow process trying to update all references. Although they get redirected fine to the new domain (also following google recommendations), I wonder if the current scenario is doing any harm, SEO wise (other than the missed visual exposure of the new brand name) ? ...since the old brand name is not present at the new site I´m thinking of including "New brand name - previously old brand name" somewhere just to provide some sort of connection to all old backlinks, would that be unnecessary? I should mention that the old brand name actually includes our most important keyword but the new brand name does not. Thanks!0 -
Community inside the domain or in a separate domain
Hi there, I work for an ecommerce company as an online marketing consultant. They make kitchenware, microware and so on. The are reviewing their overall strategy and as such they want to build up a community. Ideally, they would want to have the community in a separate domain. This domain wouldn't have the logo of the brand. This community wouldn't promote the brand itself. The brand would post content occassionally and link the store domain. The reasoning of this approach is to not interfere in the way of the community users and also the fact that the branded traffic acquired doesn't end up buying at the store I like this approach but I am concerned because the brand is not that big to have two domains separated and lose all the authority associated with one strong domain. I would definitely have everything under the same domain, store and community, otherwise we would have to acquire traffic for two domains. 1. What do you think of both scenarios, one domain versus two? Which one is better? 2. Do you know any examples of ecommerce companies with successful communities within the store domain? Thanks and regards
Intermediate & Advanced SEO | | footd0 -
Redirect ruined domain to new domain without passing link juice
A new client has a domain which has been hammered by bad links, updates etc and it's basically on its arse because of previous SEO guys. They have various domains for their business (brand.com, brand.co.uk) and want to use a fresh domain and take it from there. Their current domain is brand.com (the ruined one). They're not bothered about the rankings for brand.com but they want to redirect brand.com to brand.co.uk so that previous clients can find them easily. Would a 302 redirect work for this? I don't want to set up a 301 redirect as I don't want any of the crappy links pointing across. Thanks!
Intermediate & Advanced SEO | | jasonwdexter0 -
301 redirect a old site that has been "dead" for a while?
Hi guys, A quick question. I have a client who has an old business website that had some great links (Forbes.com, CocaCola.com, etc). The problem is that he knew nothing about SEO and let the hosting expire. He still owns the domain, but the site is no longer listed in Google. He did no SEO, so I am not worried about being hit by any artificial anchor text penalties, since the links are as natural as it gets. So my questions is, would there be any benefit from 301 redirecting that site to his new business? The new business is in almost exactly the same niche as the old site. I am thinking of 301'ing to a sub-page which will refer to his past venture with the old business, not to the homepage of the new site. Thanks in advance for your help.
Intermediate & Advanced SEO | | rayvensoft0 -
New website from scratch and redirects or maintaining domain?
Hi friends, I have to face a big challenge. My client has an online store with about 250 products. The store is based on a web service provider whose CMS gives critical duplicate content issues. My client is considering to rethink the store from scratch and choose a CMS that offers more guarantees. I have two options: Starting the store from scratch with new domain and make redirects (whole domain or page to page?) Maintaining the domain, careful to keep the current structure of the URL, which is currently pretty bad I hope you could help me. Thanks in advance.
Intermediate & Advanced SEO | | sergio_redondo0 -
301 redirect from one domain to other domain, How To?
Hi, I need to redirect 150 products pages from http://www.filtrationmontreal.com/ to http://www.furnacefilterscanada.com/ How can I do this? Is there a tool or anything I can do to do 301 from one domain to another one? Can I use Google Webmaster Tool? Thank you, BigBlaze
Intermediate & Advanced SEO | | BigBlaze2050 -
Redirect between domains: any real number on how much link juice is lost?
Hi, I'm thinking of rebranding my website and moving it to a new domain. Of course I would implement 301 redirects page to page from old-domain.com to new-domain.com. I wonder if you have any real figure based on your experiments on how much link juice I could lose in the process and if it will take time for Google to re-crawl correctly the new page. I could get some of the backlinks changed as well, so they would point to the new domain. Cutts says it would get changed at least the more important, but how many? which are the more important? Also, what about if I move just a part of the website that has no backlinks? Supposedly it won't have any link juice to pass through but of course all the pages will be hosted on a brand new domain that won't pass domain-power to those internal pages, so will I lose rankings for these pages? Thanks for any help, Best regards
Intermediate & Advanced SEO | | SandraMoZ0