Welcome to WebmasterWorld Guest from 54.145.55.135

Forum Moderators: httpwebwitch

Message Too Old, No Replies

sub-directory pages in sitemap.xml

How to do?

     
8:30 am on Mar 19, 2009 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:6667
votes: 130


I'm adding a monthly newsletter to a client's site and created a sub-directory named /directory to keep the pages in.

The hosting company's (apache) server forwards: www.example.com/directory to: directory/example.com

I'm also using a RedirectMatch 301 rule in htaccess to move this directory's pages accordingly. Everything works as expected.

Question: When I add these directory pages to the sitemap.xml...

Do I add them like this:

<url><loc>http://www.example.com/directory</loc>blah... blah...
<url><loc>http://www.example.com/directory/1.html</loc>blah... blah...
<url><loc>http://www.example.com/directory/2.html</loc>blah... blah...

Or like this?

<url><loc>http://directory.example.com</loc>blah... blah...
<url><loc>http://directory.example.com/1.html</loc>blah... blah...
<url><loc>http://directory.example.com/2.html</loc>blah... blah...

Or do I create a new sitemap.xml for just this directory?

4:15 pm on Mar 19, 2009 (gmt 0)

Moderator This Forum from CA 

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 29, 2003
posts:4059
votes: 0


The authority answer would be:
[google.com...]

Cross-site submissions will work only if all sites have been verified in Webmaster Tools, or if your Sitemaps are listed in your robots.txt file.

subdomains are considered "cross-site", as discussed at length here:
[webmasterworld.com...]

if your subdomains are verified as Google suggests, you can put your sitemap XML anywhere you like.
Otherwise, you should put a separate sitemap XML in each subdomain.

I would definitely use the redirected subdomain URLs, since those are the canonical URLs for those pages

7:15 pm on Mar 19, 2009 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:6667
votes: 130


I didn't say anything about "sub-domains"

This is just a directory (folder), there is only one domain at the account.

2:26 am on Mar 20, 2009 (gmt 0)

Moderator This Forum from CA 

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 29, 2003
posts:4059
votes: 0


>> [directory.example.com...]

^ that is a subdomain. "example" is the domain, "directory" is the subdomain. "com" is the TLD.

[en.wikipedia.org...]

Sorry if I misunderstood your question

3:57 am on Mar 20, 2009 (gmt 0)

Moderator from US 

WebmasterWorld Administrator keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:6667
votes: 130


Thanks httpwebwitch. I had too many things going on to thoroughly understand your post (alas tabbed browsing.) Guess I'll make separate sitemap.xml files.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members