I want to redirect specific URLs to the index page not to 404 error page (ex: http://www.website.com/trip-15).

If I remove any character from the URL it will go to 404 error page (ex: http://www.website.com/trip-1).

I want to redirect it to the index page. Any help?

  • What have you tried? – John Conde Jun 9 '13 at 14:34
  • Don't do that. If you can't find something, then say you can't find it (which is what 404 means), don't say that whatever they were looking at can be found on the homepage. It isn't what people expect to happen, and it makes it really hard to fix typos or copy/paste errors. – Quentin Jun 10 '13 at 6:17

Redirecting all mistyped URLs to the homepage isn't generally best practice. This is why we have 404 pages - to tell users that they've landed on a non-existent page. Instead, here are a few tips:

  1. Make your 404 page friendly and useful. Don't make users feel like they've done something wrong, but make it REALLY easy to get where they want to be. Give them a search box, and maybe some links to your most popular pages. If your site is really smart, take what's been typed in as a URL and display some "you typed this, did you mean that?" suggestions.
  2. Regularly review Crawl Errors in Google Webmaster Tools. This shows you pages that Google has found that don't work (404, 500, etc) and help you identify where these links might be coming from. You may be able to get 3rd parties to fix their links.
  3. Use your list of 404 Crawl Errors to determine which individual pages to 301 redirect. So if you see references to "/tirp-15" you can 301 that to "/trip-15" and actually get users where they want to be.

This may be a bit more work than just mass-redirecting everything, but on an ongoing basis it'll lead to a much better user experience AND ranking for your pages overall.


Nice question, its common to have URL and we wish to have redirect the wrongly typed URL to your home page. I need little more information which CMS or platform you are using, it may be vary according to the server you are using, and i found the site where you can do set your costume error message or site setting to generate the code for your error.

http://www.htaccessredirect.net/ you can visit as per your quarry, i think you want to redirect the pages from 404 page to your home page right. its not about wrong/mistyped URL its about URL which is not in your site, so here is code i could generated that you can enter in your .htaccess file

//Custom 404 errors ErrorDocument 404 http://yoursitename.com/index.html

I hope this will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.