Htaccess help... I moved my blog from a seperate domain to newdomain.com/blog
-
Hi,
I need help with my htaccess file, I've been told.
I moved a blog i had hosted somewhere else to a directory on my ecommerce site. I was told i would need to write something to go in the htaccess file so the sites would not become duplicate content, but I'm a novice and have no idea how to write that code.
blog moved from www.whosyourmoondoggie.com to www.moondoggieinc.com/blog
Please help, or direct me to the right tutorial
Thanks!
KristyO
-
found this
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !newdomain.com$ [NC] RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]
and it worked, thank you guys for your help though!
-
When I put in your code I get a 500 error? and if I put in JayD's code the site comes back up but there's not a visible redirect.
I know this sounds sill but I'm putting this into the htaccess of the old domain correct?
Should i be getting a 500 error or be seeing a visible redirect when i go to the address?
Thanks KO
-
Thank you everyone!
-
Hi Kristy
If you want to move old domain to the new domain you should do a 301 moved permanently redirect.
RewriteEngine On
RewriteBase /RewriteCond %{HTTP_HOST} !www.whosyourmoondoggie.com$ [NC]
RewriteRule ^(.*)$ http://www.moondoggieinc.com/blog/$1 [L,R=301]
After adding this code search engines and users will be automatically redirected to the new domain and all information related to that domain will transfer in new domain. One of the biggest advantage is that your page rank, link juice will also transfer to new domain. Your website can be accessed with www.domain.com and domain.com. So you can easily solve duplicate content error with this code.
-
Hi Kristy, If that does not work call my office in the morning and ask for CRIS... I WILL INSTRUCT HIM TO HELP YOU..
BEST,
TOM
972-382-3241
-
This should be close. No warranties!
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.whosyourmoondoggie.com
RewriteRule (.*) http://www.moondoggieinc.com/blog/$1 [R=301,L]
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
-
Old domain to new domain
Hi, A website on server A is no longer required. The owner has redirected some URLS of this website (via plugin) to his new website on server B -but not all URLS. So when I use COMMAND site:website A , I see a mixture of redirected URLS and not redirected URLS.Therefore two websites are still being indexed in some form and causing duplication. However, weirdly when I crawl with Screaming Frog I only see one URL which is 301 redirected to the new website. I would have thought I'd see lots of URLs which hadn't been redirected. How come it is different to using the site:command? Anyway, how do I move to the new website completely without the old one being indexed anymore. I thought I knew this but have read so many blogs I've confused myself! Should I: Redirect all URLS via the HTACESS file on old website on server A? There are lots of pages indexed so a lot of URLs. What if I miss some? or Point the old domain via DNS to server B and do the redirects in website B HTaccess file? This seems more sensible but does this method still retain the website rankings? Thanks for any help
Technical SEO | | AL123al0 -
Creating a help hub, not sure the best name to use, " keyword help " or " help hub "?
I've been creating new content for our site, lots of help related content, so I created a help hub section. Now the more I go through it, and look at url structure and breadcrumbs, I can't help but think I should be using a keyword in there, but also don't want to over do it, since the keyword we are shooting for is also a subsection of our site, complete with url keyword and breadcrumb. So I just don't want to have too many over redundant titles like keyword this and keyword that, so I came here to get some advice from the awesome community of folks. Keep help hub so it's: Url: site.com/help-hub/helppage1 Breadcrumb: Home > Help-Hub > Help Page 1 or Url: site.com/keyword/help/helppage1 Breadcrumb: Home > Keyword > Help > Help Page 1
Technical SEO | | Deacyde0 -
Merging Domains
Hi, Everyone, My company is currently working with a client that has multiple websites and is interested in merging them into one. One is a primary corporate site, the other is a site for a single line of products. They obviously want to merge the product site into the corporate site. The interesting thing is that the product site outperforms the corporate site. It has the highest traffic, and it has far more links/linking domains, a higher domain authority (although only by two points), and much more social activity. However, their reasons for wanting to merge the two are completely valid - less management, URL would match print collateral, etc. They're asking our opinion on whether or not to move forward with the merger. I'm leaning toward no simply because of the fact that the site they want to merge is outperforming the other. I'm curious, though, to get some other opinions on this. Would a merger be worth the work in this case? Any advice would be appreciated. Thanks!
Technical SEO | | PapercutInteractive0 -
Redirecting a questionable domain to a trusted domain
I have a question!
Technical SEO | | FDFPres
We have 2 domains operating within the same retail sector. One of them is for our bricks and mortar business and the other is a new brand we launched as a nationwide e-retailer. We aggressively built links for the new one and achieved some very good search positioning, where we remained for about 4 months until the google updates of the first half of this year started biting. The domain never received a warning from google or anything, but the links have clearly been devalued to a point where the domain is now virtually buried for the most competitive terms. However, the domain does still get around 100-200 visitors per day, and has a DA of 38. We're thinking about a reshuffle that would involve putting the products in to our brick and mortar business website, and redirecting the brand domain to the bricks and mortar domain. Thank you for reading this far! the question is then, is there a danger of the bricks and mortar domain being tarnished by this? as i said the brand domain hasn't had any notices of penalty from google but it has definitely been hit by updates.0 -
Is it better for our Blog to be blog.domain.tld or domain.tld/blog ?
I'd dread the answer being the latter rather than the former as we've spent two years building it blog.domain... However I noticed SEOmoz are domian.tld/blog and it got me thinking.... Cheers. R.
Technical SEO | | RobertChapman0 -
A rel="canonical" to www.homepage.com/home.aspx Hurts my Rank?
Hello, The CMS that I use makes 3 versions of the homepage:
Technical SEO | | EvolveCreative
www.homepage.com/home.aspx homepage.com homepage.com/default.aspx By default the CMS is set to rel=canonical all versions to the www.homepage.com/home.aspx version. If someone were to link to a website they most likely aren't going to link to www.homepage.com/home.aspx, they'll link to www.homepage.com which makes that link juice flow through the canonical to www.homepage.com/home.aspx right? Why make that extra loop at all? Wouldn't that be splitting the juice? I know 301's loose 1-5 % juice, but not sure about canonical. I assume it works the same way? Thanks! http://yoursiteroot/0 -
Moving domain.com to subdomain.domain.com
Hi, I like to do something, but first like to take some opinions from seomoz. My question is: 1. I have a domain: brandtrends.com and i like to move this from brandtrends.com to trends.brand.com because: brandtrends.com is on the position #15 on the second page of SERP for my "brand" keyword. I like to move it under trends.brand.com but all inbound-links are @brandtrends.com What do you thing, if i move permanently 301 from brandtrends.com to trends.brand.com does it rank under brand.com on the 1st page of SERP..? like to rank trends.brand.com under brand.com on results page...!!! I have the backlinks of brandtrends.com on my hands too, should i leave the inbound links @brandtrends.com and the new ones i build with trends.brand.com or should i change the inbound links from brandtrends.com to trends.brand.com Hope you got it! THanks
Technical SEO | | leadsprofi0 -
Moving Site with #1 Ranking to New Domain
I want to move a site of mine that ranks #1 for many keywords to a new domain name. I have already redirected many smaller less important sites to the new domain, but have held off on my most popular site. If I redirect the entire site with a 301 redirect, what can I expect with my number one ranking, particular for coveted search terms..thanks for the input.
Technical SEO | | insync0