Sitemap for single page site

Hi,

I was wondering if it is of any use to provide a sitemap.xml for google when you only have a one page site. Aren’t sitemaps to help google find all the pages on your site. When you only have one page I wonder if it is of any use.

Kars

I would not bother with creating a sitemap if your website is only a single page.

Thanks, I see that my page is indexed on google, but the problem is it doesn’t index my content, but only the message that javascript wasn’t enabled. All my content is generated with javascript. What can I do about this? Does google crawl pages with js turned off?

No, Google will not index content that is generated by Javascript. And nor will a lot of people be able to access it either. Your content and navigation should always be written in the raw HTML.

Creating a sitemap won’t fix the problem - it’s a bit like putting a sticking plaster on your elbow to help with a broken leg…

Yes thanks for the tip :smiley: I was thinking of sitemaps first because I thought my site wasn’t indexed at all. But it was, just that my content isn’t. So I will have to use php for example to create the content? I was also thinking of nodeJS, but haven’t really tried that yet.

I don’t think Google indexes any page generated by javascript and you shouldn’t bother creating a site map for a site with just a single web page.

What’s wrong with plain ol’ HTML? If it’s a single page then I’m not sure what kind of trickery you’re planning that would need anything other than hard-coded HTML.

The content is generic, created from reading RSS Feeds. It changes all the time. I was using Google Feeds API to display the feeds with js.

Then it’s probably best to use PHP or some other server side language and have it spit out regular HTML. Google will slurp that up with no problems.

Thanks, it’s what I’m working on now. I’ve found SimplePie: Super-fast, easy-to-use, RSS and Atom feed parsing in PHP. to use for reading RSS Feeds with PHP.

JavaScript is invisible for search engines. Php might work.

Search engines can execute some javascript, but the more complicated it becomes and the more spread out it is (multiple external files), the less likely they are to execute it.

If you want to ensure the content on your page is found by the search engines, the best approach as others have stated here is to make sure you include it directly in the html rather then inserting it via javascript.