301 entire site
-
Is there a good 301 code snippet to change just the root domain but keep the ending extensions?
I just bid on a domain that I think would be much better for me moving forward, but do not want to have to try going through thousands of pages to do their 301 individually
My site is almost 4 yrs old. Well established and has a large fanbase. Several of our social networks are under the name of the new branded domain, hence part of the desire to switch.
-
Exactly. Assuming your directory site structure is the same, it will do a blanket redirect from one URL to the new one.
-
And that will redirect
domain.com/page1/ to domain2.com/page1/
and domain.com/morefolder/evenmore/ to domain2.com/morefolder/evenmore/
and do this for every page across the site?
-
Very simple. Find your .htaccess file for the URL you want to redirect FROM and add a line like the following:
Redirect 301 / http://www.example-site.com/
Just change out your own destination URL of course. Don't ignore that solo slash, that's key as well.
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
-
When the site's entire URL structure changed, should we update the inbound links built pointing to the old URLs?
We're changing our website's URL structures, this means all our site URLs will be changed. After this is done, do we need to update the old inbound external links to point to the new URLs? Yes the old URLs will be 301 redirected to the new URLs too. Many thanks!
Intermediate & Advanced SEO | | Jade1 -
URL mapping for site migration
Hi all! I'm currently working on a migration for a large e-commerce site. The old one has around 2.5k urls, the new one 7.5k. I now need to sort out the redirects from one to the other. This is proving pretty tricky, as the URL structure has changed site wide. There doesn't seem to be any consistent rules either so using regex doesn't really work. By and large, the copy appears to be the same though. Does anybody know of a tool I can crawl the sites with that will export the crawled url and related copy into a spreadsheet? That way I can crawl both sites and compare the copy to match them up. Thanks!
Intermediate & Advanced SEO | | Blink-SEO0 -
New site started ranking, lost ground after 301...?
Hi everyone. So we decided to re-brand a website starting with a fresh domain and fresh website (new everything). The first 4 weeks the site was performing really well and started bringing organic traffic for several targeted keywords (small amounts, but something). Around 5 weeks later, we decided to perform a 301 Redirect from an older site we had that really hadn't changed since 2007. As soon as we performed the 301, we started loosing ground on the keywords that were starting to perform. I may help to mention that we were targeting different keywords on the new site, versus the keywords/industry that were targeted on the older site... because we were focusing on another but similar industry. Now, 10 weeks later we are still not showing up for the keywords that we were starting to make headway on in the first four weeks of starting.... any ideas why? suggestions? The 301's were performed properly. We verified them, and we check Google WMT for any additional ones that may still be out there, but try to fix them as soon as possible. We have grown the site from just a few pages to over 60+ pages in the last 2 months with unique and fresh content targetting those keywords... Thank you in advance
Intermediate & Advanced SEO | | co.mc0 -
Better SEO Option, 1 Site 3 Subdomains or 4 Separate Sites?
Hey Mozzers, I'm working with a client who wants to redo their web presence. They have a a main website for the umbrella and then 3 divisions which have their own website as well. My question is: Is it better to have the main site on the main domain and then have the 3 separate sites be subdomains? Or 4 different domains with a linking structure to tie them all together? To my understanding option 1 would include high traffic for 1 domain and option 2 would be building Page Authority by having 4 different sites linking to each other? My guess would be option 2, only if all 4 sites start getting relevant authority to make the links of value. But right out of the gates option 1 might be more beneficial. A little advice/clarification would be great!
Intermediate & Advanced SEO | | MonsterWeb280 -
Any reason not to redirect entire directory from old site structure to new?
I'm helping on a site that has tons of content and recently moved from a 10 year old .ASP structure to WordPress. There are ~800 404s, with 99% of them in the same directory that is no longer used at all. The old URL structures offer no indication of what the old page contents was. So, there is basically no way to manually redirect page by page to the new site at this point.....is there any reason not to redirect that entire old directory to the new homepage? Matt Cutts seems to think its OK to point an entire old directory to a new homepage, but its not as good as the 1:1 redirects: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=93633 Any thoughts?
Intermediate & Advanced SEO | | wattssw0 -
Redirection to mobile site
Calling all SEO ninjas! I'm currently developing single web pages for various clients which function as abbreviated versions of their main websites. They are all related & under a single domain. When a user visits these pages on a mobile device, CSS is used to display mobile friendly versions of these pages. My clients are thrilled with these mobile versions and now want to also redirect mobile visitors from their main site (which is not mobile optimised) to these pages. My questions are: Are there any negative implications if we did this? ie. redirecting to a different domain What is the best method for redirection? eg. JavaScript Can this be achieved by adding a single line of code to their main site Can this be done in an SEO friendly way so that the redirection acts like a backlink? Many thanks.
Intermediate & Advanced SEO | | martyc0 -
301 - do i change old links once 301 is in place?
Hey all, I'm about to setup a 301 on a website that has pretty good SEO rankings and I have the ability to change all the old inbound links that point to the old site, to the new site - should I leave them pointing to the old site that has the 301 on it or change all the old inbound links to the new domain name? Which has better SEO value? Thanks for helping, Anthony
Intermediate & Advanced SEO | | Grenadi0 -
SEO for Log in Sites
Hello, I just lunched a website where you have to sign up and to log in in order to use it. So I have the home, also a blog but then the rest of the pages are let's say it "hidden".How would you do the seo for it? I have been cheking facebook, foursquare and some others and they use different approaches. Facebook uses the same description in every single page for example. My site is similar to foursquare users have profile, stats, history, ranking. Well, what is your advice?? Thanks a lot
Intermediate & Advanced SEO | | antorome0