301 redirecting some pages directly, and the rest to a single page
-
I've read through the Redirect guide here already but can't get this down in my .htaccess
I want to redirect some pages specifically (/contactinfo.html to the new /contact.php)
And I want all other pages (not all have equivalent pages on the new site) to redirect to my new (index.php) homepage.
How can I set it up so that some specific pages redirect directly, and all others go to one page?
I already have the specific oldpage.html -> newpage.php redirects in place, just need to figure out the broad one for everything else.
-
also, keep in mind that if you are ranking on secondary terms on the non-front pages, you will lose a lot of that relevance by forwarding to only your home page (esp. if it's not about that specific thing.
example:
old site about fruit on home page - old subpage about applesthe old subpage about apples may rank really well
next, you forward the old subpage about apples to your new front page
the search engines go "oh, this page isn't as relevant as the old apples subpage that no longer exists, let's bump down the rankings"hence, it's always best to forward your equivalent old content to your equivalent new content.
-
hi -
how many pages are we talking here?check with your website host. many of of them have redirect utilities (such as isapi_rewrite : http://www.isapirewrite.com/) installed on the server (or just "rewrite" for apache i think) that will allow you to add a set of rules to your .htacess so it filters the way you want every time someone hits an old page. you would need 2 rules:
1.) when site is contactinfo.html --> contact.php
2.) when all others ---> send to index.phpi would highly advise forwarding more relevant pages to their new equivalents if they are available. doing it the way you've mentioned will send link juice to index.php, but you may run into relevance issues.
isapi_rewrite is a little complicated in terms of it's syntax rules, but they've got a pretty useful forum. additionally, sometimes website hosts have a pro that can help you if you can't figure it out.
hope that's of some help! :>)
dan
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 Place to Redirect 301 to?
Hey Everyone! I have an old site with hundreds of blog posts that are very spammy (duplicate content, keyword stuffed, and just plain bad content). I am going to redirect them and delete them from WordPress but I'm wondering where is the best place to redirect them to? Home page, other posts, other pages...? Any thoughts would be appreciated! Thanks!
Technical SEO | | adamxj21 -
Moving Blog and 301 Redirect Advice
Hello Moz Community, We recently moved our blog from its own domain to a directory on our website. We do not plan on moving over all the old blog posts because a majority most of them are based on events or time-sensitive information that has passed. We need advice on what to do with all of the old blog URL's? Should we just 301 all of them to the new blog directory on our website (www.domain.com/blog)? Should we take the time to move over all the old blog content and put the appropriate 301's in place? Any and all advice would be greatly appreciated. Thank you in advance.
Technical SEO | | All-Star-Vacation-Homes
Best,
Rich0 -
My Alexa ranking dropped after a 301 redirect is that bad?
I had all of my non www pages redirect to the www versions. My alexa ranking dropped and keeps dropping after I did this. I'm guessing its because its tracking the non www version. Does anyone know if this is correct and should I worry?
Technical SEO | | CandleCam0 -
301 redirect all 404 pages
Hi I would like to have a second opinion on this. I am working on an ecommerce website that they 301 redirect all 404 pages (including the URLs entered incorrectly) to the “All categories page”. Will this have any negative SEO impact?
Technical SEO | | iThinkMedia0 -
Redirects 301
Hello, I need to reedirect a URL of a page that I have in my site (http://digitaldiscovery.com.pt/servicos-de-marketing-digital/publicidade-online/) to a new URL with SEO porpuses. Whats the best way to this? I use Wordpress btw. Tks in advance! PP
Technical SEO | | PedroM0 -
Canonical tag, CNAME and 301 redirect
I have a website with a couple of domains pointing to one IP address. Let's say I have two domains www.example.com and www.example.ca I also see during my SEO analysis that the example.com and the www.example.com (same for the example.ca and the www.example.ca) are triggering server responses. How do I deal with this issue for best SEO. Canonical links? CNAME, or 301 redirects? thanks
Technical SEO | | casper4340 -
301 redirects twice
We currently have some 301 redirects set up on our site however sometimes a page will redirect twice before reaching the final location. Is this OK from an SEO perspective to have a page redirect twice or should we concentrate on reducing it to one?
Technical SEO | | JohnHillman0 -
Google Confusion: Two Sites and a 301 Redirect.
Hi, We have a client who just sprang a new project on us. As always, they went ahead and did some stuff before bringing us into the loop! (oh the joy of providing SEO services!) Anyway, i'm pretty swamped right now and need some extra brains on this. Basically the client had www.examplesiteA.com online for many years (an affiliate site which had built up a strong brand in the industry). They have now decided to turn this affiliate site into a full blown service platform and so with the new site being built they 301'd the whole thing over to www.examplesiteB.com - this is where they want all the old affiliate content to be hosted. So essentially examplesiteA.com is now examplesiteB.com and a new site is being placed on examplesiteA.com - still with me? So this has all happened and a brand new website is on examplesiteA.com and the old examplesiteA is now sitting exactly as it used to, but on the examplesiteB domain. The 301 redirect has been removed and the new examplesiteA seems to have been crawled, but the homepage is not indexed. When you search for examplesiteA, examplesiteB is the top result. Now they are similar domain names and to be fair I have very little data at this point i.e. I don't know when the 301 redirect was removed and it maybe that this all fixes itself with time. How is link equity effected now that examplesiteA.com was 301 redirected to examplesiteB.com and cached in this way, but now the 301 redirect has been removed and does not exist? Would link juice have been diluted throughout the process? Obviously if we had been in on all this before anything was implemented we would have done things differently. Interested to hear what others would do coming in at this point. Thanks and look forward to the advice!
Technical SEO | | MarcLevy0