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
-
Linking from & to in domains and sub-domains
What's the best optimised linking between sub-domains and domains? And every time we'll give website link at top with logo...do we need to link sub-domain also with all it's pages? If example.com is domain and example.com/blog is sub-domain or sub-folder... Do we need to link to example.com from /blog? Do we need to give /blog link in all pages of /blog? Is there any difference in connecting domains with sub-domains and sub-folders?
Intermediate & Advanced SEO | | vtmoz0 -
How can I fix a SSL that is redirecting 3 times?
I have url that is redirecting three times. How do I fix that? I am using WP and running Really Simple SSL plugin. Is it ok to use the redirect plugin also? See here what the problem is: http://www.thepatrickmullin.com/ redirects to https://thepatrickmullin.com/ through a redirect chain. This hurts your rankings http://www.thepatrickmullin.com/ -->
Intermediate & Advanced SEO | | pmull
https://www.thepatrickmullin.com/ -->
https://thepatrickmullin.com/ Any help would be greatly appreciated!0 -
Domain Redirect and SSL Cert
Hi, When redirecting an entire site to another domain, do you have to maintain the SSL certificate? The SSL expires 3 days before the planned redirect. Thanks in advance.
Intermediate & Advanced SEO | | sofla_seo0 -
Working to Start an Shopping Idea Site - Which Totally Based On Scraping product from Ecom. How Quickly I should Add products and categories in this new domain.
How Quickly I should Add products and categories in this new domain. We are going to start its promotional by google adwords and facebook. I worrying about 10000's of product pages. kindly guide me.
Intermediate & Advanced SEO | | innovatebizz0 -
Help understanding 301 domain redirect
Can anyone help me understand a specific process of a 301 redirecting a domain. Here is what I would like to know.... When you 301 redirect a site, most if not all the links follow to your new site. But how does this process happen? 1.When Google sees the new domain does it simply apply the backlink profile of the old site to the new one? 2. Does it have to re-crawl all the links one by one and apply them to the new domain? 3. or something else?
Intermediate & Advanced SEO | | gazzerman10 -
Same Branding, Same Followers, New Domain After Penalty... Your Opinion Please
I know I've asked a similar question in the past but I'm still trying to figure out what to do with my website. I've got a website at thewebhostinghero.com that's been penalized by both Panda and Penguin. I cleaned up the link profile and submitted a reconsideration request but it was denied. I finally found a handful of additional bad links and I submitted a new disavow + reconsideration request a few days ago and I am still waiting. That said, after submitting the initial disavow request, the traffic has completely gone and while I expected a drop in traffic, I also expected my penalty to be lifted but it was not the case. Even though the penalty might be lifted this time, I think that making the website profitable again could be harder than creating a new website. So here's my questioning: The website's domain is thewebhostinghero.com but I also happen to own webhostinghero.com which I bought later for $5000 (yes you read that right). The domain "webhostinghero.com" is completely clean as it's only redirecting to thewebhostinghero.com. I would like to use webhostinghero.com as a completely new website and not redirect any traffic from thewebhostinghero.com as to not pass any bad link juice. Pros: Keeping the same branding image (which cost me $$$) Keeping the 17,000+ Facebook followers Keeping the same Google+ and Twitter accounts Keeping and monetizing a domain that cost me $5000 webhostinghero.com is a better domain than thewebhostinghero.com Cons: Will create confusion between the 2 websites Any danger of being flagged as duplicate or something? Do you see any other potential issues with this? What's your opinion/advice? P.S. Sorry for my english...
Intermediate & Advanced SEO | | sbrault740 -
Can I use a "no index, follow" command in a robot.txt file for a certain parameter on a domain?
I have a site that produces thousands of pages via file uploads. These pages are then linked to by users for others to download what they have uploaded. Naturally, the client has blocked the parameter which precedes these pages in an attempt to keep them from being indexed. What they did not consider, was they these pages are attracting hundreds of thousands of links that are not passing any authority to the main domain because they're being blocked in robots.txt Can I allow google to follow, but NOT index these pages via a robots.txt file --- or would this have to be done on a page by page basis?
Intermediate & Advanced SEO | | PapaRelevance0 -
BIG CHANGE - 301 Main site to new domain
Hi Guys, Were wondering what to do about our main domain name, we were ranking quite high for our main keyword and before Christmas our site dropped to 10th and we have been there for a while - last week our site dropped again onto the second page. The worrying thing is now our main domain name is now ranking 1 place above another domain name that we don't really use but its an exact match domain name for our target keyword. This exact match domain has hardly any links pointing to it and it currently has a 22 domain authority. We are wondering if we 301 our main site to this exact match domain would it rank higher than the top of the 2nd page where we are now for our main domain. Cheers.
Intermediate & Advanced SEO | | ScottBaxterWW1