how to create a 404 redirect page to homepage

8 replies
Hi warriors,

In my GWT, I have a lot of 404 errors,

how do I create a redirect to my homepage.

thanks
#404 #create #homepage #page #redirect
  • Profile picture of the author PeachCoding
    Pretty simple. Create an .htaccess file on the /public_html/ (or equivalent) folder with the code below:

    Code:
    ErrorDocument    404    /
    That will redirect all 404 loads straight to your homepage. Hope that helps.
    Signature

    Services offered: PSD to Wordpress, Joomla, Drupal Templates or Full Site, Custom PHP or C# Programming, Fix problems on any software, and more.

    You will get 25% OFF all services by mentioning the Warrior Forum. PM me here or email me to ivanphp404@gmail.com if interested and/or if you have questions.

    {{ DiscussionBoard.errors[4699733].message }}
    • Profile picture of the author Unomateo
      Your readers might get confused if they are looking for something but keep ending up on the homepage...

      A good solution to to provide a 404 page what displays similar posts.

      "Sorry we couldn't find xxx... Here are similar posts"
      {{ DiscussionBoard.errors[4700144].message }}
      • Profile picture of the author Jeremy123
        thanks for your replies,

        I discovered that within my hosting account, I can create custom 404 pages,
        just go to your cpanel and then to error pages and follow the directions.

        {{ DiscussionBoard.errors[4700157].message }}
  • Profile picture of the author shareclock
    thanks but can i create costume 404 error page??
    {{ DiscussionBoard.errors[4705787].message }}
    • Profile picture of the author Kacy Carlsen
      Yes, you can have your error pages go to any page that you choose. So create your custom page and have your errors direct to that page

      Originally Posted by shareclock View Post

      thanks but can i create costume 404 error page??
      {{ DiscussionBoard.errors[4718549].message }}
  • Profile picture of the author CRGreen
    Has anyone experimented with setting up 404 pages that recommend other relevant products or information through an affiliate link?
    {{ DiscussionBoard.errors[8059534].message }}
  • Profile picture of the author bryguy
    If you are using a Wordpress site and don't want to mess around with .htaccess, you can also just install a simple redirect plugin. The one I use is by Jordi Plana and works perfectly. You can find it at Jordi PlanaWordpress Plugin: 404 Simple Redirect | Jordi Plana

    Essentially, you just have to activate the plugin and then set the url of the homepage and you are good to go.
    {{ DiscussionBoard.errors[8086003].message }}
    • Profile picture of the author Hatescheese
      In your 404 doc you can add
      <meta http-equiv="Refresh" content="5; URL=/"> in the <head> section and that will redirect them to your homepage after 5 seconds
      {{ DiscussionBoard.errors[8090425].message }}

Trending Topics