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
-
I have duplicate content but // are causing them
I have 3 pages duplicated just by a / Example: https://intercallsystems.com/intercall-nurse-call-systems**//**
Technical SEO | | Renalynd
https://intercallsystems.com/intercall-nurse-call-systems**/** What would cause this?? And how would I fix it? Thanks! Rena0 -
Google showing https:// page in search results but directing to http:// page
We're a bit confused as to why Google shows a secure page https:// URL in the results for some of our pages. This includes our homepage. But when you click through it isn't taking you to the https:// page, just the normal unsecured page. This isn't happening for all of our results, most of our deeper content results are not showing as https://. I thought this might have something to do with Google conducting searches behind secure pages now, but this problem doesn't seem to affect other sites and our competitors. Any ideas as to why this is happening and how we get around it?
Technical SEO | | amiraicaew0 -
Domain Switch - With lost control of original domain.
Hey all, A client finally sold a domain name after being harassed to sell for many years, without talking to us about it first. They moved the site to a new domain, and the purchasing company took over the original domain. Then they called me, wondering why the site is no longer showing up in Google. I've done some initial research, and everything I find for advice assumes that you have control over the original domain. We don't. I'm hoping someone here has some creative advice, so we don't have to start from the beginning, and/or painfully update links we've acquired. My only thought was that the new company may be kind enough to post 301's for us if we provided them.... Any thoughts / advice / life rings will be greatly appreciated! 🙂
Technical SEO | | KBK0 -
Step by step article on migrating domain for personal blog
Greetings! I have been running my personal blog on first-lastname with a .me extension and I finally managed to acquire first-lastname.com!!! Now I would like to migrate my Wordpress implementation to the new URL. It will exactly the same. Where could I find a detailed step by step on exactly how to do this? Appreciate your time 🙂 Alex
Technical SEO | | seomozzy0 -
How can I prevent duplicate content between www.page.com/ and www.page.com
SEOMoz's recent crawl showed me that I had an error for duplicate content and duplicate page titles. This is a problem because it found the same page twice because of a '/' on the end of one url. e.g. www.page.com/ vs. www.page.com My question is do I need to be concerned about this. And is there anything I should put in my htaccess file to prevent this happening. Thanks!
Technical SEO | | onlineexpression
Karl0 -
Migrating a better performing domain to a less well performing domain
I have a customer who has many domain names and assets but she's wanting to consolidate some of them to help her simplify things for her customers but mostly she wants to build up her website through which she sells products. Grief Reflection - www.griefreflection.com is a personal journal that she's keeping to process the impending death of her husband and it's also linked to her business website which sells healing from grief types of products. Storybooks for Healing - www.storybooksforhealing.com is the website through which she sells workbooks and memory books for people who want to keep the memory of their loved one alive after they've gone. I've setup both of these domains as campaigns and have been looking at the metrics for both. The grief reflection blog out performs the storybooks for healing website. If we merge the two then the Grief Reflection blog would likely become a subdirectory under www.storybooksforhealing.com and be more fully integrated which she thinks will help her visitors not get confused while navigating her website. www.griefreflection.com has 12,637 links while www.storybooksforhealing.com has 1,462. Also, Google has indexed 380 pages of Grief Reflection and only 100 pages for Storybooks for Healing, though that may be because there are fewer pages to index. Grief reflection also has a 4.36 mozRank and 5.30 mozTrust, where Storybooks has 4.13 mozRank and 5.15 mozTrust. Should I counsel her to keep these domains separate? If not, would simply setting up 301 redirects from the www.griefreflection.com domain name to the new subdirectory under www.storybooksforhealing.com be the way to go? Thank you ever so much for any wisdom anyone can provide.
Technical SEO | | ChristiMc0 -
Buying a SERPs competitor domain / site
For a specific term, we have the potential opportunity to purchase the domain (complete with site) that sits just above us in the Google search results... The domain has reasonable page authority of 49, domain authority of 38 with 168 linking root domains - 311 total links... Would the most beneficial use of the domain be to retain the site content as is and incorporate a few relevant links back to our site or... 301 the entire domain?
Technical SEO | | digitalarts1 -
.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