301 Problem
-
Hi Guys,
Just have a small problem with a htaccess 301 redirect.
I would like to 301:
www.old-domain.com & old-domain.com
to
The site is exactly the same with the same directory structure so i would also like all the subpages to work. Eg:
www.old-domain.com/folder/page & old-domain.com/folder/page
to
www.new-domain.com/folder/page
Many thanks
-
Great. Thankyou.
-
RewriteEngine On
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]Source:
http://301redirects.net/redirect-old-domain-to-new-website.php
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
-
Best process for expired webinars advertised as events 301, 404
Looking for input please on best process from an SEO point of view: We hold a webinar We promote webinar in the website (wordpress) as an event When the webinar finishes we un-publish the event and create a resource page for the recorded webinar and copy the content of the original event post I'm seeing 404's due to the webinar event pages being unpublished. Should I be 301'ing the events to the resource page or keep both? or some other proposal? Many thanks!
On-Page Optimization | | w4rdy1 -
301 twice redirect (no negative)
Can i made twice 301 redirect, because i got "droped" domain and i dont want negative effect to new website. Can i redirect users some other way with no negative effect for fresh website?
On-Page Optimization | | cerar0 -
301 Redirect from .html
Hi there, Following on from this post:
On-Page Optimization | | finelinewebsolutions
http://moz.com/community/q/help-with-duplicated-content Please could one confirm that using the following code in our htaccess file will stop the duplicated content issue we are having. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+.)+html?\ HTTP
RewriteRule (.+).html?$ http://www.bereavementstationery.co.uk/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html Kind Regards Alec0 -
Big problem with my new crawl report
I am owner of small opencart online store. I installed http://www.opencart.com/index.php?route=extension/extension/info&extension_id=6182&filter_search=seo. Today my new crawl report is awful. The number of errors is up by 520 (30 before), up with 1000 (120 before), notices up with 8000 (1000 before). I noticed that the problem is with search. There is a lot duplicate content in search only. What to do ?
On-Page Optimization | | ankali0 -
301 Redirects From a URL without Keyphrases to one With Keyphrases
I have a client that sells services. Each service offered currently has a URL structure like this: www.companyname.com/product/asp$view-id-page3022-item-24 These pages are pretty old, and I would love to have a more user-friendly URL like this: www.companyname.com/product/purple-swatch-watch If I rename the URL and do a 301 redirect, what impact will that have on search? Ideally, this page will be optimized for "purple swatch watch", but the current URL structure is so... well, you know. My apologies if this has been answered before. I tried looking through archived of 301 issues, but lost hope after my first 10 or so attempts at answered didn't help this specific issue.
On-Page Optimization | | ericav0 -
Is that a problem for indexing?
Hi all, I have an issue driving me crazy thant I think it could be impacting in the SERPs. My site has a spanish version "www.tarifakitesurfcamp" and an english version "www.tarifakitesurfcamp.com/en". These two "pages" in the CMS ("inicio" and "home") have the same title and the same description tag (in spanish) as the plugin ALL in one SEO only allows me to write one unique title and description for the home page via GENERAL OPTIONS (there's an option for "home title" and for "home description").. If a try to assign a title and a description individually for each page it doesn't work (I can't see the titles and description in the source code" of those pages. On the other hand, there's another page that is http://www.tarifakitesurfcamp.com/?attachment_id= which I can't locate in the CMS within pages section. This page has the same tittle and description as well. Could anyone give me a solution? Thanks.
On-Page Optimization | | juanmiguelcr0 -
Losing Page Rank after 301 redirect from http to www
Hi Guys I have site-wide redirected all http// to www and all the category pages lost their page ranks (except home page). I would like to know if this is normal and is it one of the possible causes in losing keyword ranking?
On-Page Optimization | | ilovebodykits0 -
301 Redirect to mobile site effecting rankings
On my site I redirect users when on a mobile device to be redirected to my mobile version of my site. In the last couple weeks I added that redirect in my htaccess file. I just realized today that I am doing a 301 redirect. In the last few weeks my ranking have gotten lower. I am starting to think that because of the redirect my mobile site is not as optimized as my regular site and therefor is effecting my rankings. My question is how can I redirect my users to my mobile site but not use a 301 AND how do I get google to use my main site content for ranking on the mobile side. I want to go back to getting my search rankings on the mobile side using my main sites content. Can I simply remove the 301 on the redirect? Hope that makes sense.
On-Page Optimization | | cbielich0