2

Our website's template is for a job directory site, but it was repurposed for a school directory. The CSS, HTML, and PHP strings still show Company in the code, but the company name can't be seen on the front end. Will Google see and index the old company name from the CSS and PHP?

2
  • Google will index the text in HTML files since they are web pages. Specifically, the content screen between the <body> tags and could use some of the information between the <head> tags such as the "description."
    – Steve
    Commented Jun 20, 2022 at 17:31
  • Is the company name in the output from the PHP, or only in its source code? Commented Jun 20, 2022 at 18:44

1 Answer 1

3

No, they will not.

Googlebot will use the resources your site depends on (CSS, JS) to render your pages, but it will not index them. These files are not of any use for ranking. Web pages are understood by their HTML markup, images, structured data, and other pages that link to them.

It would not be very reliable for Google to pay attention to, for example, WordPress themes due to the vast number of sites that use the same theme.

What types of files may get indexed?

99% of what Google indexes are web pages and images. Occasionally, you might stumble upon an indexed sitemap.xml or robots.txt, but you'd have to really be looking for those to find them (eg. site:example.com/sitemap.xml). While it is unlikely that a normal searcher will ever come across them, you can safely serve a X-Robots-Tag: noindex header to prevent this from happening.

2
  • 2
    Google occasionally indexes things I don't think of as web pages. I've seen it index both robots.txt and sitemap.xml files. However, I've never seen Google index JavaScript or CSS files. Commented Jun 20, 2022 at 18:43
  • @StephenOstermiller touche. Commented Jun 20, 2022 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.