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.
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
-
Site Merge Strategy: Choosing Target Pages for 301 Redirects
I am going to be merging two sites. One is a niche site, and it is being merged with the main site. I am going to be doing 301 redirects to the main site. My question is, what is the best way of redirecting section/category pages in order to maximize SEO benefits. I will be redirecting product to product pages. The questions only concerns sections/categories. Option 1: Direct each section/category to the most closely matched category on the main site. For example, vintage-t-shirts would go to vintage-t-shirt on main site. Option 2: Point as many section/category pages to larger category on main site with selected filters. We have filtered navigation on our site. So if you wanted to see vintage t-shirts, you could go to the vintage t-shirt category, OR you could go to t-shirts and select "vintage" under style filter. In the example above, the vintage-t-shirt section from the niche site would point to t-shirts page with vintage filter selected (something like t-shirts/#/?_=1&filter.style=vintage). With option 2, I would be pointing more links to a main category page on the main site. I would likely have that page rank higher, because more links are pointing to it. I may have a better overall user experience, because if the customer decides to browse another style of t-shirt, they can simply unselect the filter and make other selections. Questions: Which of these options is better as far as: (1) SEO, (2) User experience If I go with option 2, the drawback is that the page titles will all be the same (i.e vintage-t-shirts pointing to the page with filter selected would have "t-shirts" as page title instead of a more targeted page with page title "vintage t-shirts." I believe a workaround would be to pull filter values from the URL and append them to the page title. That way page title for URL t-shirts/#/?=1&filter.style=vintage_ would be something like "vintage, t-shirts." Is this the appropriate way to deal with it? Any thoughts, suggestions, shared experiences would be appreciated.
Intermediate & Advanced SEO | | inhouseseo0 -
Site Migration of 4 sites into 1?
Hi Guys, I have a massive project involving a migration of 4 sites into 1. 4 sites include: **www.MainSite.com ** www.E-commerce.com www.Membership.com www.ResearchStudy.com Goal of this project is to have 1-4 regrouped into Main Site I will be following the best practice from this post https://mza.bundledseo.com/blog/web-site-migration-guide-tips-for-seos which has an awesome checklist. I am actually about to start Phase 3: URL redirect mapping. Because all of these sites have hundreds of duplicates, I figured I should first resolve the Main Site dup issues before creating the URL redirect mapping but what about the other domains (2,3,4) though? Should I first resolve the Dup issues on those ones as well or it is not necessary since they will be pointing into the Main Site new domain? I want to make sure I don't overwork the programming team and myself. Thanks For sharing your expertise and any tips on how should I move forward with this.
Intermediate & Advanced SEO | | Ideas-Money-Art0 -
Disavow files on m.site
Hi I have a site www.example.com and finally have got the developers to add Google webmaster verification codes for: example.com m.example.com As I was advised this is best practice - however I was wondering does this mean I now need to add the disavow file. Thanks Andy
Intermediate & Advanced SEO | | Andy-Halliday0 -
Is it ok to 301 redirect this previously algorithmicly penalised site?
Hi All, Is it OK to 301 redirect site A to site B? Site A: http://goo.gl/P9Zp2y Site B: http://goo.gl/ySDCzb The story - in 2013 site a seemed to be penalised with some kind of anchor text algorithm penalty - SEO couldnt fix, so created site B and turned site A into a holding page with a no follow link to new site. SEO company worked on disavow file etc, implemented in late 2013 301 redirect site A to B in late 2013 - SEO advised to stop 301 about 8 weeks later... This was my fault i didnt realise the implications of a redirect... Stopped the redirect, but too late, as site B dropped in rankings in early 2014 - new disavow files uploaded to both sites, but damage seems done now. No longer have a SEO company, and i would ideally like to 301 redirect site A to B, as it looks messy having a holding page - but wanted to check if SEO would still strongly advise against that? please advise James
Intermediate & Advanced SEO | | isntworkdull0 -
Is the Tool Forcing Sites to Link Out?
Hi I have a tool that I wish to give to sites, it allows the user to get an accurate idea of their credit score with out giving away any personal data and with out having a credit search done on their file. Due to the way the tool works and to make the implementation on other peoples sites as simple as possible the tool remains hosted by me and a one line piece of Javascript code just needs to be added to the code of the site wishing to use the tool. This code includes a link to my site to call the information from my server to allow the tool to show and work on the other site. My questions are: Could this cause a problem with Google as far as their link quality goes? - Are we forcing people to give us a backlink to use the tool? (in the eyes of Google) or will Google not be able to read the Javascript / will ignore the link for SEO purposes? Should I make the link in the code Nofollow? If I should make the link a Nofollow any tips on how to make the most of the opportunity from a link building or SEO point of view? Thanks for your help
Intermediate & Advanced SEO | | MotoringSEO0 -
301 of EDM domains
If I buy a keyword EDM domain and 301 redirect it to my site, will I rank better for that keyword?
Intermediate & Advanced SEO | | creaturmedia0 -
Site dancing
Hi guys I have a site which is dancing. I mean one day is on position 20 , if I put more backlinks is falling, after rising again,, I dont know what is going on. The site is 2 years old, pr 2, authority 35. Why this is happening? Usually when he appears again is ranking higher, but today he disappear totally from rankings. Maybe return tomorrow? But anyway why is dancing? Thanks
Intermediate & Advanced SEO | | nyanainc0 -
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