How to fix Page not found/404 error in WordPress?

10 replies
  • WEB DESIGN
  • |
Hi Warriors,

Recently 1 of my site get hacked and the hacker put some melware in my sites, I contact with hosting company and they said it is not possible to clear.
Then I have delete full site and design it again with some old posts.
Now I facing a lot of page not found and 404 error in my site.
I am not understand How can I fix the problem.

Now my question is is there any way to fix the problem easily? by any code or plugins?
I am using a plugin named 404-redirected but it is very difficult to fix them manually, because within 3 days i get about 900 error.
So, Please guide me a best solution please.
#error #fix #found or 404 #page #wordpress
  • Profile picture of the author Sarevok
    Screw the plugin, edit (or create) your .htaccess file and put this code:

    ErrorDocument 404 http://www.wheretheyshouldgo.com

    The .htaccess file should be located in the root directory of the domain.
    {{ DiscussionBoard.errors[7274473].message }}
  • Profile picture of the author Obosh
    Sarevok is correct....just use your .htaccess file....
    u can even redirect your all 404 pages to home page.....
    {{ DiscussionBoard.errors[7274489].message }}
  • Profile picture of the author Istvan Horvath
    FYI: you can have a 404.php template file in your theme's directory... and then follow this:
    Creating an Error 404 Page « WordPress Codex
    Signature

    {{ DiscussionBoard.errors[7274995].message }}
    • Profile picture of the author image2all
      Originally Posted by Istvan Horvath;727499
      5

      FYI: you can have a 404.php template file in your theme's directory... and then follow this:
      Creating an Error 404 Page « WordPress Codex

      Dear Sir,
      Thanks for your post. I have already done it. Even I make put code so that there should show some related post in 404 Error pages.
      But it still show Nothing Found.

      Just Example if you visit the URL Below then you will be understand.
      www. bangladesh2u.com/care-hospital-bangladesh-ltd/

      I just want to do the word so that the error page cannot show Nothing Found / Page not Found/ 404 Error etc in the Heading or Title Bar.
      Is there any option for me ?
      Signature

      My Posts at: Quora | Vimeo | Tumblr | Storify | WordPress.com | Diigo | About.me

      {{ DiscussionBoard.errors[7288668].message }}
  • Profile picture of the author WebsiteBegin
    I've always used the Smart 404 plugin. It's a nifty little code that, when combined with some coding on your 404 page, can either redirect users to a related page (based on keywords in the error + the page it would direct to), or give related pages. It helps reduce BR significantly.
    Signature
    WebsiteBegin | Learn to Build and Manage an Amazing Website

    Follow me on Twitter - Joeb3219
    {{ DiscussionBoard.errors[7275029].message }}
  • Profile picture of the author imarkedy
    I am going to 'cut against the grain here' - Every page on your site is one more tool to get visitors to your site. '404s' kill your credibility with both indexing bots as well as visitors. There are plugins to remedy this but most just import other like content by way of hyperlinks and display them on the 'missing page'.

    This could be file directory issue but my guess is it is something simple (like permalink mistakes). Check your traffic monitoring tool and see what page is effected. Delete the page and if it is critical SUPER CRITICAL page, recreate it with another 'like' permalink.

    I have to take issue with the suggestion on 'redirects' to homepages or other than what the visitor came to see.When a page is bookmarked, indexed etc and someone clicks on the link, they have searched the term and expect to get what they arrived for be it free info etc.

    When that doesn't happen, sure some people will stick around but I GUARANTEE your site bounce rate will increase. All I am saying is don't 'spray paint' over these 'site blotches' - manage them.
    Signature

    B.D. Dale
    SBDC TV
    Online Marketing Instructor

    {{ DiscussionBoard.errors[7276624].message }}
  • {{ DiscussionBoard.errors[7276663].message }}
  • Profile picture of the author Beverley Boorer
    guys, I noticed a lot of 404 errors on my website stats. I checked with hostgator live and the guy reckoned that they are only bots or non-human hits. I have no idea if this is right, but from what I've read here it seems to be not right.
    Something else I read said it would only happen if the person typed a mistake in the URL. In any case, i seem to have lots of them in my stats.
    You mean they were all bonefide visitors that missed getting to my website? AWWWW!!. SHame!!. Especially since I haven't understood a word of the advice on what to do about it.
    {{ DiscussionBoard.errors[7276683].message }}

Trending Topics