0

I have my own directory for static files and that's why I want to move my favicon, robots.txt, sitemap and other files of the same sort to it. Therefore, these files will be accessible not as my_website.com/robots.txt, my_website.com/favicon.ico, but my_website.com/my_files_path/robots.txt, my_website.com/my_files_path/favicon.ico

I wonder, won't this hurt my website in terms of SEO? Are there other drawbacks? Is it better to put these files in the root directory?

Sojo
  • 5,455
  • 3
  • 10
  • 11
  • Not sure about the robots.txt. But you are able to specify the directory for the favicon in the .htaccess, though for simplicity I would keep them where they belong. – AlexG Jun 08 '16 at 10:22

1 Answers1

3

Web robots will look for the robots.txt in your root directory. So it's a good idea to place it there. On this page Google says:

In order to make a robots.txt file, you need access to the root of your domain.

Most browsers will look for a favicon.ico in your root aswell. You can specify a different path to your icon with the <link> element. However, remember that all files on your site is not HTML. If a user views an image, PDF or similar then the <link> element will not work. In such cases, the browser will likely fall back on the file in the root folder.

Emil
  • 1,786
  • 1
  • 17
  • 22