Google webmaster 404 pages

Discussion in 'Search Engine Optimization' started by webtutophp, Mar 16, 2016.

  1. #1
    Hi everyone,

    I have a problem that google webmaster notifies me about and hope i can find answer here.

    lets say my link is like this : myWebsite.com/website/2016/page.html

    My problem is that google notifies my that i have alot of 404 page errors for examlpe :

    - myWebsite.com/website/2016/
    - myWebsite.com/website/

    I dont want google to divide my link and go there because its not a real link and it gives lot of 404 pages in google webmaster ,I just made it with HTACCESS, the real link is something like this :

    - myWebsite.com/site.php?web=website&year=2016

    Thanks in advance
     
    webtutophp, Mar 16, 2016 IP
  2. Matthew Sayle

    Matthew Sayle Illustrious Member

    Messages:
    3,325
    Likes Received:
    464
    Best Answers:
    1
    Trophy Points:
    435
    #2
    You will need to create a robots.txt file in your root directory to block search engines from crawling certain pages of you site.

    For you, it should look like:

    User-agent: *
    Disallow: /website/2016/
    Disallow: /website/
    HTML:
    Add any other pages that you do NOT want Google to crawl, using the template Disallow: directory

    Once you're done, save the file and use this method for testing:
    https://support.google.com/webmasters/answer/6062598?hl=en

    Another way of doing it would be to put all of the pages that you don't want Google to crawl into a single file like Example.com/website/stuff

    Then, you could disallow the crawling of that entire directory like:
    User-agent: *
    Disallow: /website/stuff/
    
    HTML:
    Note, the above code will block ALL search engine robots - not just Google. I figure with 404 issues like you're having, this would be the best way to do it.
     
    Last edited: Mar 16, 2016
    Matthew Sayle, Mar 16, 2016 IP
  3. webtutophp

    webtutophp Greenhorn

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #3
    Thanks for your answer but if i disallow :
    /website/2016/

    Would google still follow and index :
    /website/2016/page.html

    ?

    no risk here ?
     
    webtutophp, Mar 16, 2016 IP
  4. Matthew Sayle

    Matthew Sayle Illustrious Member

    Messages:
    3,325
    Likes Received:
    464
    Best Answers:
    1
    Trophy Points:
    435
    #4
    It would be best to disallow the exact page(s) you don't want indexed.

    Like:

    Disallow: /website/2016/page.html
     
    Matthew Sayle, Mar 16, 2016 IP
  5. webtutophp

    webtutophp Greenhorn

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #5
    I dont want to disallow the pages

    the page is : /website/2016/page.html

    but i want to disallow /website/2016/


    but i want google to still index and follow /website/2016/page.html

    I hope I did not confuse and you understood me well

    Thanks alot for your help
     
    webtutophp, Mar 16, 2016 IP
  6. rankwatch.com

    rankwatch.com Active Member

    Messages:
    898
    Likes Received:
    22
    Best Answers:
    2
    Trophy Points:
    63
    #6
    Webtutophp, you want /website/2016/page.html to index and /website/2016/ to de-index.

    In this situation, I think you should redirect page /website/2016/ to /website/2016/page.html and use “fetch as Google” option in Google Webmasters tool. I hope this will help.
     
    rankwatch.com, Mar 19, 2016 IP
  7. webtutophp

    webtutophp Greenhorn

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #7
    Hi @rankwatch.com I already did that and it get redirected to another page using .HTACCESS, but the problem is that in google webmaster it still gives me ERROR 404 even if i redirect it
    Thanks
     
    webtutophp, Mar 19, 2016 IP