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
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.
Thanks for your answer but if i disallow : /website/2016/ Would google still follow and index : /website/2016/page.html ? no risk here ?
It would be best to disallow the exact page(s) you don't want indexed. Like: Disallow: /website/2016/page.html
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, 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.
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