Forum Moderators: open
<?php
echo "<title>Site Map</title><h1>Site Map</h1>";
$dh = opendir("./");
$file = readdir($dh);
$file = readdir($dh);
while(!(($file = readdir($dh)) === false)){
if(!is_dir("$dirname/$file"))
print "<a href=\"$file\">$file</a><br>";
}
closedir($dh);
?>
Can you suggest why Google didn't follow those links?
the php code doesn't help as what google reads is the actual html code it generates. If you view the source of your page after it displays you will see what Google sees. Make sure that all the links are easy and simple to read, and dont have strange formatting within them, and that the wholepage is valid HTML.
Im no expert PHP coder but shouldnt you have a HTML and BODY tag and closing tags in an echo statement there?
[edited by: chiyo at 1:34 pm (utc) on May 4, 2003]
It might take some time before the links are followed. There is no guarantee that links in a new page found by freshbot are automatically followed. It could depend on the PR of the page linking to the site map, the work load for freshbot, etc.
If you look in the cache of the site map, what do you see?
When did your see the site map for the first time in the SERP?
(and yes, the code is not complete, i wanted to make it as short as possible... just show what is relevant)
the cache says "Your search - cache:http://www.widgets.com/sitemap.php - did not match any documents. "
BUT my log shows that google requested that page
it is linked from every page on the site, which is PR4
On a related topic remember that Google probably only follows a certain number of links from each page.
<just an instinct>
Im not convinced that for various reasons Google now or in the future takes much notice of site maps anymore. Especially if they are just, as is normal, long lists of linked URL's.
I think they take more notice of natural structure - ie. home page links to major section indexes -> major sections links to sub section indexes ->sub section indexes link to etc etc. This makes more sense for both user and spider.
</Just an instinct.>
the PR of the homepage could drop.
I don't think so. If you are linking to one sitemap (that contains 100 links on it), then the total PR flowing out to that sitemap is the same as what goes to any other page. The one hundred links on the site map have to share that one spurt of PR.
Adding new content to your web site is not going to lower your PR.
Also remember that the value of a sitemap lies not only in getting your deep pages spidered, but also in helping out your visitors. Group the links into relevant categories and slap some keyword rich category headings to identify what those groups are about. If the sitemap is good for your user, it will be amazingly good to you.
Also as we get involved in PR we need to remember that Google only gets people to visit our sites. The next challenge is to keep them there. A good site map can help.