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
-
'domain:example.com/' is this line with a '/' at the end of the domain valid in a disavow report file ?
Hi everyone Just out of curiosity, what would happen if in my disavow report I have this line : domain:example.com**/** instead of domain:example.com as recommended by google. I was just wondering if adding a / at the end of a domain would automatically render the line invalid and ignored by Google's disavow backlinks tool. Many thanks for your thoughts
Technical SEO | | LabeliumUSA0 -
Migrating domains from a domain that will have new content.
We have a new url. The old url is being taken over by someone else. Is it possible to still have a successful redirect/migration strategy if we are redirect from our old domain, which is now being used by someone else. I see a big mess, but I'm being told we can redirect all the links to our old content (which is now used by someone else) to our new url. Thoughts? craziness? insanity? Or I'm just not getting it:)
Technical SEO | | CC_Dallas0 -
Cross domain shared/duplicate content
Hi, I am working on two websites which share some of the same content and we can't use 301s to solve the problem; would you recommend using canonical tags? Thanks!
Technical SEO | | J_Sinclair0 -
What are the pros and cons of changing my domain from .com to .us in Google webmaster tools?
Hi, I'm migrating my site from a .com domain to local country domains. I'm wondering what to consider if i chose to move the .com to .us domain. What should I consider before deciding? BR
Technical SEO | | Quru0 -
Mobile Site Domain/URL Structure
We are currently building a mobile optimised version of our main website and I had some questions with regard to SEO. 1. Is it best to structure the domain as: m.yourdomain.com yourdomain/m 2. It is correct to place rel="cannonical" on the mobile pages and to have only the main site indexed? Thanks in advance and links or books on mobile seo you can direct me to that would be greatly appreciated. Phil
Technical SEO | | Phily0 -
Business/Personal Blog Duplicate Content
Quick Question. I am in the process of launching a new website for my IT business which will include a blog. I also want to start up my personal blog again. I want to publish some blog posts to both my business and personal blogs but I don't want to have any duplicate content issues. I am not concerned with building the SERPs of my personal blog but I am very focused on the business blog/site. I am looking for some ideas of how I can publish content to both sites without getting hurt by duplicate content. Again, I am not concerned with building up the placement of my personal site but I do want to have a strong personal site that helps build my name. Any help on this would be great. Thanks!
Technical SEO | | ZiaTG0 -
Domain name with separated/non-separated keywords
I start a new webshop within a month about spices and coffee. I'm thinking about the domain name to take. I would like to get visitors from coffee and spice keyword searches. How much does it matter (in terms of SEO) if I use spiceandcoffee instead of spice-and-coffee? (The site will be hungarian and it sounds easy to remember without the hypen: fuszer-es-kave or fuszereskave.) Does Google weighing more separated keywords in domain, instead of non-separated?
Technical SEO | | joo0 -
Correct 301 of domain inclusive "/"
Do I have to redirect "/" in the domain by default? My root domain is e.g. petra.at
Technical SEO | | petrakraft
--> I redirect via 301 to www.petra.at Do I have to do that with petra.at/ and www.petra.at/, too?0