homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Gold Sponsor 2015!
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

What's the best way to write internal links in sitemap.xml

5+ Year Member

Msg#: 3648919 posted 3:42 pm on May 13, 2008 (gmt 0)

OK, I just read that my sitemap.xml shouldnot have both the domain plus the domain-slash-index.htm else it looks like duplicate content - Thank you all BTW for that info - big help!

I'm now about to change all the links to "index.htm" to go to simply "/" (It's not a big deal, the site's not that huge)

My question now is, is it better to use "/" or "www.whatever.htm/" for links to the home page?

In fact, are you supposed to write out the whole domain for every internal link? I haven't been, I just use <a href="page1.htm">page 1</a> Would it be better to write the links as <a href="www.whatever.htm/page1.htm">page 1</a> ?




WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3648919 posted 7:00 pm on May 13, 2008 (gmt 0)

It is best to use the full, absolute url.


5+ Year Member

Msg#: 3648919 posted 7:16 pm on May 13, 2008 (gmt 0)

Thanks Tedster.
I think your answer refers to the sitemap.xml, so dumb followup - what about the internal links of the web pages themselves? (not the sitemap, but the actual content pages)
Should they be relative, or absolute, or does it not matter on the content pages? So... Assuming everything is in the same root directory, a link from pagetwo.htm to pageone.htm could be written:

http: // www.---.com/pageone.htm

The first way is easier to test on a hard drive. But is there any difference in terms of SEO?


5+ Year Member

Msg#: 3648919 posted 12:32 pm on May 14, 2008 (gmt 0)

Q: Do URLs in the Sitemap need to be completely specified?

Yes. You need to include the protocol (for instance, http) in your URL. You also need to include a trailing slash in your URL if your web server requires one. For example, http://www.example.com/ is a valid URL for a Sitemap, whereas www.example.com is not.


By the way, a sitemap contains only internal links.

[edited by: Achernar at 12:32 pm (utc) on May 14, 2008]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved