1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to Remove 404 Error?

Discussion in 'robots.txt' started by prabhjot.singh, Aug 26, 2012.

  1. #1
    Hi Experts,


    I have question for you. How many way i can remove 404 error?

    Before 2 month i convert my website HTML to PHP. (Previous links was www.mywebsite.com/news/article123.html Present links look like this www.mywebsite.com/news/article123.php). Both have no difference except extension. Now present links are working perfectly but Previous links With .html Links are giving me more then 1000 of 404 error's. I have 2 way robot.txt and webmaster tool. With robots.txt i cant block that directory because same directory i am using right now. and google webmaster tool take my lot of time. As you know every one have consume time. Do you have any other way to block that previous url.

    Thank you
     
    prabhjot.singh, Aug 26, 2012 IP
  2. zubizubi

    zubizubi Active Member

    Messages:
    946
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    83
    #2
    I think you can change the link alias
     
    zubizubi, Aug 26, 2012 IP
  3. sniper2008

    sniper2008 Active Member

    Messages:
    807
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    70
    #3
    if you use wordpress, simply add this plugin: 404-to-start
     
    sniper2008, Aug 27, 2012 IP
  4. prabhjot.singh

    prabhjot.singh Active Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    65
    #4
    Yes i can, but as i said it will take my lot of time . Any other solution????
     
    prabhjot.singh, Aug 27, 2012 IP
  5. prabhjot.singh

    prabhjot.singh Active Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    65
    #5
    I try but plugin is not working and 2nd think is, i am asking How to remove all 404 error from search engine?
     
    prabhjot.singh, Aug 27, 2012 IP
  6. gaush007

    gaush007 Greenhorn

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #6
    You just need to place a proper code in your .htaccess file of php. Search for the redirection code on google which will allow you to redirect all your old pages to new. In terms of google it will take time according to google indexing. According to my experience it takes around 3 to 4 months competely to reflect your new links if google give preference to your website again. All depends on the content and your proper links. The webmaster will refelct the 404 error till your all pages are not properly redirected. Once you have redirected all your pages then these errors will automatically will be wiped off from your webmaster tools after 3 months. All the best.
     
    gaush007, Sep 16, 2012 IP
  7. Ivan Daicho

    Ivan Daicho Guest

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    use 301 redirect or just leave it as the next spider crawl to detect and remove automatically once it crawled the url which returns 404 but if you want fast URL removal try using the Remove URLs in Google Webmaster Tools
     
    Ivan Daicho, Sep 27, 2012 IP
  8. Nyle Reme

    Nyle Reme Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    You should use 301 redirect this will redirect you to your desired url then you no need to remove anything...
     
    Nyle Reme, Sep 29, 2012 IP
  9. php_developer

    php_developer Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    <HTML>
    <HEAD>
    <title> 404 Error Page</title>
    </HEAD>
    <BODY>
    <p align="center">
    <h1>Error 404</h1><br>Page Not Found
    <p>
    <?php
    $ip = getenv ("REMOTE_ADDR");
    $requri = getenv ("REQUEST_URI");
    $servname = getenv ("SERVER_NAME");
    $combine = $ip . " tried to load " . $servname . $requri ;
    $httpref = getenv ("HTTP_REFERER");
    $httpagent = getenv ("HTTP_USER_AGENT");
    $today = date("D M j Y g:i:s a T");
    $note = "You are in a wrong page!" ;
    $message = "$today \n
    <br>
    $combine <br> \n
    User Agent = $httpagent \n
    <h2> $note </h2>\n
    <br> $httpref ";
    $message2 = "$today \n
    $combine \n
    User Agent = $httpagent \n
    $note \n
    $httpref ";
    $to = "here is the mail id;
    $subject = "yourdomain Error Page";
    $from = "From: \r\n";
    mail($to, $subject, $message2, $from);
    echo $message;
    ?>
    Visit our Home Page
    </BODY></HTML>

    then replace "yourdomain.com" with the URL of your website.
     
    php_developer, Oct 21, 2012 IP
  10. prabhjot.singh

    prabhjot.singh Active Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    65
    #10
    Sorry, Not satisfied

     
    prabhjot.singh, Oct 22, 2012 IP
  11. kashishjain

    kashishjain Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    use the plugin - 301 redirect and redirect the 404 pages to homepage and you are good to go.
     
    kashishjain, Nov 24, 2012 IP
  12. prabhjot.singh

    prabhjot.singh Active Member

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    65
    #12

    Yes Bro many tools available for this who will drop my user 404 to home page so that user cannot see any error in my website. Please read Carefully Previous article123.html Present links look like this article123.php. Both have no difference except extension. Now present links are working perfectly but Previous links With .html Links are giving me more then 1000 of 404 error's.
     
    prabhjot.singh, Feb 12, 2013 IP
  13. ryan_uk

    ryan_uk Illustrious Member

    Messages:
    3,983
    Likes Received:
    1,022
    Best Answers:
    33
    Trophy Points:
    465
    #13

    Someone already mentioned what to do... use a 301 with .htaccess and then you won't lose backlinks and won't have 404s.


    RedirectMatch 301 ^/(.*).html$ http://www.example.com/$1.php
    Code (markup):
    Something like that should do the trick.

    Search Google and learn.
     
    ryan_uk, Feb 14, 2013 IP
    Arick unirow likes this.
  14. gaush007

    gaush007 Greenhorn

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #14
    Just sign in into your webmasters account -> go to Health->Crawl Errors, now click on the error link. After clicking click on the option Linked From and see where your 404 page is linked from. Now ask your developer or tester to investigate such pages and remove the dead 404 pages from those pages or sitemap. once done let google crawl your website and then see the difference. As you have already done 301 in your .htaccess file. Try this and your problem will be solved.
     
    gaush007, Mar 22, 2013 IP
  15. debrupseo

    debrupseo Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #15
    Just ask your developer for One-to-One 301 redirection for your website from .htaccess.
     
    debrupseo, Jun 17, 2013 IP
  16. nehasharma06

    nehasharma06 Active Member

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #16
    You Make 404 error page in your website and redirect your 404 links in this URLs
    http://www.elixirwebsolutions.com
     
    nehasharma06, Jun 18, 2013 IP
  17. Arick unirow

    Arick unirow Acclaimed Member

    Messages:
    719
    Likes Received:
    298
    Best Answers:
    30
    Trophy Points:
    500
    #17
    This is by far the best answer for the problem.
    I'll try to explain:
    1. Blocking with robots.txt is the worst case.
      Do it and many backlink and authority/trust from each URL will be gone. It will make the homepage lose so many authority and trust. Worse, the new link which has the same content (.php) will need new 'treatment' to be ranked and trusted just like the (.html) version. Because (.html) was blocked, then, the new (.php) will get no benefit at all. Sometimes it wouldn't show up high in SERP due to duplicate content (from .html). Until the old link completely wiped out (which is impossible if there are more domain pointing link to (.html version)) the new link will not going to be ranked high.
    2. Deleting Link via Google WMT (Webmasters Tools).
      Don't even touch this feature. It is not good to wipe out link (.html version) as it will make the site lose of it previous rank, authority and trust. 301 redirection is the best.
      To use it nicely, There would be so many 404 (you already told us it is about 1000 or more). Don't delete it or marked it as fixed.
      After you implement the code given by Ryan_Uk in your (.htaccess), then you can select them all and 'mark them as fixed'. It will make you regain your authority, trust and rank from your old link (.html) to (.php). Any sites which point to your site (your backlink) will reamain OK and google will automatically pass it to new URL.
    I wish you didn't delete 404 in WMT before applying what was mentioned above. If your installation redirect 404 page to 404.php, I can give you the code that will tell both human and SE if the old URL was changed. However, Using (.htaccess) is recommended as it uses less resources and very effective.

    Edit: And I didn't realize this is a thread from previous months ago (almost a year). Well, I got too excited and didn't check when the thread was created. It was shown up in the top as 'updated thread' because a member drop a comment. I should take some sleep. :)
     
    Last edited: Jun 18, 2013
    Arick unirow, Jun 18, 2013 IP
    ryan_uk likes this.
  18. lovetowork

    lovetowork Active Member

    Messages:
    103
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    65
    #18
    I remove by robot.txt with exact path. But you should take care on that. Because in that case you may loose the subpages what you are blocking.
     
    lovetowork, Jun 18, 2013 IP
  19. Rakeshraj

    Rakeshraj Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #19
    First update your sitemap.xml, and also go to webmaster tool and there is an error section and fix there 404 error
     
    Rakeshraj, Jul 15, 2013 IP