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
-
How can i solve this redirect chain issue?
Hey, can somebody explain to me how can I solve this redirect chain issue? I tried redirecting /contact-us directly to **/contact/ **but this causes a chain of redirects of infinite dimensions. I don't know how to find the old redirect and delete it. Is there such an option? Thank you! byA7l
Intermediate & Advanced SEO | | Popos1 -
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 -
Website Re-Launch - New URLS / Old URL WMT
Hello... We recently re-launched website with a new CMS (Magento). We kept the same domain name, however most of the structure changed. We were diligent about inputting the 301 redirects. The domain is over 15 years old and has tons of link equity and history. Today marks 27 days since launch...And Google Webmaster Tools showed me a recently detected (dated two days ago) URL from the old structure. Our natural search traffic has take a slow dive since launch...Any thoughts? Some background info: The old site did not have a sitemap.xml. The relaunched site does. Thanks!
Intermediate & Advanced SEO | | 19prince0 -
Web developer won't 301 redirect to my new website....what can I do?
I want to come away from our third party web developer and use a new website with different web developers, however the web developer wont 301 redirect the old url's to the new ones. Is he required to do this by law? Is there away of doing the 301 redirects without him? Any advice would be much appreciated. Many thanks,Tom
Intermediate & Advanced SEO | | CoGri0 -
Moving Entire Domain to New Site with New File Extensions
I have been looking for a while for a good an clear Step by Step guide for moving a site from an old to a new domain... so I guess a good discussion here, could help many web masters have a smooth transition. So in your opinion, beside the obvious, what are the most important steps you must take? Here is what I do: 1. 301 old site to new one and TEST.
Intermediate & Advanced SEO | | dhidalgo1
2. Check Internal Links - Double Check for 404's.
3. Update your Social Profiles with new URL.
4. Let GWT and BWT of the change and request a Crawl.
5. Contact as Many of Webmaster as you possibly can to point your links to your new domain. What's missing? What have you found helpful and/or Effective?0 -
Primary Domain or Redirect?
We are starting a new travel guide for a resort town. I have bought an expired domain with decent related links and PR (which seems to have survived the transfer (4 months ago). Beofre we launch the new site I am trying to decide if we should use this expired domain as the primary URL for the new site or just do a permanent redirect and buy a new domain that better matches the theme of the site. I am obviously concerned with starting from scatch with a new domain. I am confident we can build some good rellevant links in a short time but this space is very competetive. Any input would be greatly appreciated.
Intermediate & Advanced SEO | | Locals0 -
Old and New Google Places Address Update or Create?
Working on SEO for client who is at a new address. Luckily? there are no google reviews attached to the old addresses (there 2). Should I try to update one of the old ones? Or should I just go ahead and create a new listing? What are the pros and cons of each decision.
Intermediate & Advanced SEO | | greenhornet770 -
E-commerce Adding New Content - Blog vs New Page
I have an ecommerce site (www.brick-anew.com) focused on Fireplace products and we also have a separate blog (fireplacedecorating.com) focused on fireplace decorating. My ecommerce site needs new content, pages, internal links, etc... for more Google love, attention, and rankings. My question is this: Should I add a blog to the ecommerce site for creating new content or should I just add and create new pages? I have lots of ideas for relevant new content related to fireplaces. Are there any SEO benefits to a blog over new static pages? Thanks! SAM
Intermediate & Advanced SEO | | SammyT0