.htaccess when integrating one website into another
-
My client would like to integrate one of it's smaller websites into its main website.
I've identified around 20 pages which I'd like to 301 redirect to specific pages on the main website, and this is simple enough.
The problem I have is that I am not sure how I can then put a catch-all to redirect all other pages on the site to the homepage of the main website.
I'd originally though something like this would work:
redirect 301 / http://www.mainwebsite.com/ (catch-all)
redirect 301 /about.asp http://www.mainwebsite.com/about (specific redirect 1)
redirect 301 /latest.asp http://www.mainwebsite.com/news (specific redirect 1)
etc.Any ideas?
-
Just had a eureka moment with the issue as above!
All that was needed was a .htaccess on the old site like this:
Redirect 301 / http://www.newsite.com/
This attempts to pass a user/crawler to the equivalent page on the new site (which doesn't exist), so this is then handled with a .htaccess on the new site which then redirects to the new versions of those pages:
Redirect 301 /about.asp http://www.newwebsite.com/about (specific redirect 1) Redirect 301 /latest.asp http://www.newwebsite.com/news (specific redirect 1)
Simples!
-
You should be able to achieve what you want by redirecting 404s. You can do this by adding the following to your .htaccess
ErrorDocument 404 /homepage.html
Where homepage.html is the address of your homepage.
What would be better really though is to land them on a an actual 404 page that explains that the page doesn't exist anymore and gives them options of where to go next. Include direct links to the most popular content on the site.
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
-
How do I optimize a website for SEO for a client that is using a subdirectory as a seperate website?
We launched a subdirectory site about two months ago for our client. What's happening is searches for the topic covered by the subdirectory are yielding search results for the old site and not the new site. We'd like to change this. Are there best practices for the subdirectory site Specifically we're looking for things we can do using sitemapping and Webmaster tools. Are there other technical things we can do? Thanks you.
Technical SEO | | IVSeoTeam120 -
Duplicate Pages on GWT when redesigning website
Hi, we recently redesigned our online shop. We have done the 301 redirects for all product pages to the new URL (and went live about 1.5 week ago), but GWT indicated that the old product URL and the new product URL are 2 different pages with the same meta title tags (duplication) - when in fact, the old URL is 301 redirecting to the new URL when visited. I found this article on google forum: https://productforums.google.com/forum/#!topic/webmasters/CvCjeNOxOUw
Technical SEO | | Essentia
It says we either just wait for Google to re-crawl, of use the fetch URL function for the OLD URLs. Question is, after i fetch the OLD URL to tell Google that it's being redirected, should i click the button 'submit to index' or not? (See screengrab - please note that it was the OLD URL that was being fetched, not the NEW URL). I mean, if i click this button, is it telling Google that: a. 'This old URL has been redirected, therefore please index the new URL'? or
b. 'Please keep this old URL in your index'? What's your view on this? Thanks1 -
Website Migration Query
We are going to migrate our site but we cannot do this gradually, so before we complete the whole migration, we were thinking of launching the new site on a sub-domain and gradually redirect traffic to the sub-domain, starting with 10%, moving up steadily so that we then migrate to the new site within four/five weeks. The new site will have a new URL structure on the same domain, with a complete re-design and the IP address will be changing as well, even though the server geographical location will remain the same. a) Should we noindex the new sub-domain while the new site is on trial? b) Are there any other issues we should look out for? Thanks in Advance 🙂
Technical SEO | | seoec0 -
How long does it take to reindex the website
Generally speaking, how long does it take for Google to recrawl/reindex an (ecommerce) website? After changing a number of product subcategories from 'noindex' back to 'index', I regenerated the sitemap and have fetched as Google in WMT. This was a couple of weeks ago and no action yet. Second question: Does Google treat these pages as if they're brand new? I 'noindexed' them back in April, and they were ranking ok then. (I had noindexed them on the back of advice from my SEO, due to concerns about these pages being seen as duplicate content). Help!
Technical SEO | | Coraltoes770 -
Big Mess - Multiple Websites
I have a customer, a Psychologist, who put up +/-20 websites many years ago. He has 1 main site (with his name as the domain) with hundreds of pages of quality content. The other sites are all exact match domains - anxiety counseling, couples counseling, etc. Some are single page sites, others have a good amount of quality content. Many of the EMD sites were getting ranked on the first page, as was the main site. The money site was ranking on the first page for the best keywords All of the EMD pages linked back to the main site, many with site wide footer links. The main site did not link back. All of the sites are on the same IP address. These sites have been in place for years. I don't believe that he has a duplicate content problem. About 8 weeks ago, the rankings for the main site crashed, moving 10 or more SERP pages deep. The EMD sites are still ranking. He has not gotten any nasty-grams from Google in Webmaster Tools. The Psychologist relies exclusively on organic for his business, and it has taken a significant hit. 1. Has anyone else seen this happen? 2. Is it safe to assume that Google finally nailed him for using a linking scheme? 3. How can we unwind this? The other sites are still generating business, and if those go away, he is really screwed. 4. Will taking down all of the links from the other sites be enough? Would moving the money site to another hosting company on a different IP make a difference? Ideas? I think the white hat answer would be to take down the EMD sites, and 301 redirect to the main site. The problem is that the loss of business from this process could be catastrophic.
Technical SEO | | CsmBill0 -
Will combining multiple websites/brands into one Wordpress Multisite Installation hurt SEO?
My company currently operates four websites, independently of each other, a corporate website and three separate store brands. innovativemattresssolutions.com - corporate website mattressking.net sleepoutfitters.com mattresswarehouse.com All of our stores have the same branding, same TV spots, same print ads, etc across the company, we just swap out logos on all marketing pieces. It is proving nearly impossible for us to maintain four separate websites, currently on three different platforms. all four are hosted separately as of now. We would like to combine all four websites to one Wordpress Multisite installation so we can manage the pages from one place, using the same theme and even content in many places because all brands share the same info, policies, products, etc. We would set up wordpress multi using subfolders for installation and point the URL directly to resolve to the appropriate subfolder. The only site that would crosslink to the others would be the corporate website. Is this a bad idea for SEO? What other options would we have? Should we keep the corporate site on its own installation, but put the other three brands on a multisite install? Would duplicating content on the three brand pages be an issue? Less of an issue if they were not on multisite? Any insight is much appreciated.
Technical SEO | | Karrie_Beth0 -
Am I missing something if I absorb one site into another?
We are absorbing one of our sites into another and I want to make sure I am not missing anything. The site that is being absorbed will no longer exist as all the content has been replicated/duplicated on the main site. About a month ago we added canonicals to all the duplicate content to point to the new site it will be a part of. That went very well and organic traffic continued to flow to those pages on the new site. We recently (yesterday) used 301s on all the pages using mod_rewrites and redirected the domain name from the old site name to the new one. Using mod_rewrites we redirect any other page linking to that domain to www.newsite.com?ref=oldsite.com. So far I dont see anything coming in on an unexpected link. I still need to tell Google via Webmaster Tools that the oldsite is now on newsite.com correct? Is there anything else I might bump into that we havent thought of? Thanks
Technical SEO | | GeorgeLaRochelle0 -
Internal website search
Hi, I'd like to index dynamically generated - internal website search pages - to Google. A mod rewrite to make the URL strings friendlier might be one way, but as these pages are created on the fly and effectively don't exist till the search keywords are inputted, is it even possible to index them? thanks
Technical SEO | | richcowley0