Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Google Webmaster Tools is shows wrong keywords for my site.

For example, it shows

public_html
php
include_once

and many more irrelevant keywords. I don't know why it's looking in the source code to find these keywords.

share|improve this question

migrated from stackoverflow.com Aug 30 '11 at 7:06

This question came from our site for professional and enthusiast programmers.

    
@Trott I don't understand the negative rating to this question. You should have added a comment as to why you think so. –  Van de Graff Aug 30 '11 at 6:17
    
I'm not 100% certain I'm the one that downvoted it, but I certainly did edit it to remove some ALL CAPS and a few other minor changes. And I did flag it as off topic and suggested it be migrated to the webmasters StackExchange. Now that that's happened, it's closed on StackOverflow and it does not appear that I had downvoted the question, but that may be an artifact of the question being closed. I concede that the question is not egregious, just off topic (for StackOVerflow, where I'd be leaving this comment if the question were not closed, which means comments are no longer allowed). –  Trott Aug 30 '11 at 12:19

1 Answer 1

up vote 4 down vote accepted

Google can't read your PHP code. It can only read the output of your web server. So your server must be spitting out PHP code somewhere.

If your site is functioning normally, then the most likely place for this to happen is on an error page, or 404 page. What happens if you type in a non-existent URL? Do you see an error page that includes some of the keywords above?

What happens if you search your site for some of those keywords? Which page is returned?

e.g. site:yoursite.com public_html

share|improve this answer
2  
Also something to keep in mind: if some underlying condition causes PHP to error out sporadically (i.e. not necessarily on every request) and PHP is set to display errors, it is very possible that Google is indexing content like "Error on line 520 in file /public_html/index.php: include_once(...)" - check your error logs. –  danlefree Aug 31 '11 at 0:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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