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
-
Multisite domain
good morning I have a wordpress site I have activated the multisite, currently the site has a domain authority of 8, when I publish a post, it is indexed quite quickly, if I publish a post in a language other than the /es subdomain it takes 24 hours why? If the author domain is the same, why does the employee take longer to be indexed on Google? Thank you
Technical SEO | | alainscilly770 -
Help: buy domain from Tradenames.com?
Hello to all, I'm Silvia. I am writing to ask if any of you know this site: tradenames.com. It is a domains broker. They contacted my client and would like to sell the .com business domain (my client currently has the .it). Does anyone know them? Thanks you for your help.
Technical SEO | | advmedialab0 -
Is there an SEO advantage to blog content being a child of /blog/ rather than the homepage?
I'm working on a website where all the blog content is listed as separate pages from the homepage, eg: www.domain.com/first-blog-post
Technical SEO | | MillyShaw
www.domain.com/second-blog-post However, it would make my life easier if all blog content was listed under /blog/ so that I could analyse it better in Google Analytics. Eg I'd like it to be: www.domain.com/blog/first-blog-post
www.domain.com/blog/second-blog-post The developer is not keen because it would create extra work for him, and he's also said it's a bad idea from an SEO point of view. But is this the case? Presumably with 301s in place it wouldn't make a difference? Thanks for your help!0 -
Should I Parent/Child my Website Pages (need help with terminology too)
Hello I have a website that I am trying to SEO optimise.
Technical SEO | | NikitaG
The current structure of the site is that all pages are linked directly after the domain:
example: www.domain.com**/page01** www.domain.com**/page02** The website is however logically organised in the following form:
www.domain.com**/page01/page02** Sometimes the parenting goes to 3 levels: (please help me with the right term here) Domain
↳ Page001
↳ Page002
↳Page003 My question is: should keep the current structure, or is it worth the effort to re-link the website in a parented way. Are there any benefites to one or the other, and could you point to some video tutorials or documentation to read. BqoDAsx.jpg DMMIC5o.jpg0 -
Changing from ocpatentlawyer.com to www.ocpatentlawyer.com
I want to change my web address from ocpatentlawyer.com to www.ocpatentlawyer.com. My understanding is that google treats these two web addresses as different web addresses. My blog is a pr 5 website. I don't want to make the switch and find out that google no longer ranks my pages and posts anymore.
Technical SEO | | jamesjd80 -
Moving content between two separate domains...
Hello I am looking for advice regarding moving content from one site to another. We have two websites: Site 1: E-commerce site, with content weaved in throughout the visitor journey.
Technical SEO | | DJR1981
Site 2: Blog-style site, used to archive magazine (which we own) articles online. Both sites exist on completely separate domains. Over time, Site 2 has received a lot less attention due to a change in our business objectives. As a result of this, this site is not as up-to-date as it could be and we're now starting to think about winding the brand down. However, some of the content (mostly feature-pieces, reviews etc) on Site 2 is really good and it would be a shame to just see such high quality stuff disappear into the ether. Ideally, we would like migrate some of the content on Site 2 to Site 1. The reasons for this are mostly to improve things from a visitor perspective, but also to gain any positive SEO points from adding such pieces to our main domain. I've had a look through and a lot of the articles from Site 2 are indexed. Is it going to be a case of selecting the pieces I want and then adding a 301s to those pages so they're no longer found/visable before re-publishing them on Site 1? Sorry if this is a bit of silly question, just wanted some advice to ensure I go about it the right way. Thanks!0 -
Do Collections in Shopify create Duplicate Pages according to Google/Bing/Yahoo?
I'm using the e-commerce platform Shopify to host an e-store. We've put our products into different collections. Shopify automatically creates different URL paths to a product in multiple collections. I'm worried that the same product listed in different collections is soon as different pages, and therefore duplicate content by Google/Bing/Yahoo. Would love to get your opinion on this concern! Thanks! Matthew
Technical SEO | | HappinessDigital0 -
.com or .co.uk in UK index? but the .com has higher domain authority...
Hi there i have a .com and a .co.uk for a site that has been around a while. However not much seo has been done on it, i was wonderign do i continue to optimise for the .com or switch to the .co.uk to rank in Google UK index for various search terms. .COM = 40 domain authority .CO.UK - 10 domain authority. Let the debate start 🙂
Technical SEO | | pauledwards0