On my site you can do a search for a an artist, this gives a URL of the form http://example.com/artistid, this goes to my application server if the page has never been requested it then creates it, uploads it to Amazon S3 and redirects to http://artist.example.com/artistid, if already exists it then immediately redirects to http://artist.example.com/artistid

So my question is how does this fit in with SEO and sitemaps. In Google Webmaster Tools each sub domain seems to be treated separately I cant see anything to tied them together but should I be submitting urls of the form http://example.com/artistid (which will just resolve to redirects) or http://artist.example.com/artistid (but I have to make sure the page has already been created if I do it this way). Or should I submit to both ?

  • I would say cover your bases and only refer to your site. Let the redirect do it's thing. It may also be that some search engines will ignore URLs in the sitemap that are off domain. Who knows? I would say CYA.
    – closetnoc
    Jun 25, 2015 at 15:03
  • @closenet I dont follow Jun 26, 2015 at 13:31
  • My apologies. I was saying, when you create your sitemap, I would make the URL for the <loc> example.com/artistid and just let any redirect do it's thing as long as it is a 301 redirect, it should work out fine without having to think about it. You cannot refer to a sub-domain from the parent domain's sitemap anyhow so you would not be able to refer to artist.example.com/artistid from a sitemap on example.com. -- less liquored up today... do I make better sense?? ;-)
    – closetnoc
    Jun 26, 2015 at 15:24
  • Yes, but should I not submit a sitemap on the artist.example.com site as well ? Jun 28, 2015 at 16:51
  • Good point. I would.
    – closetnoc
    Jun 28, 2015 at 16:53

1 Answer 1


The first aspect, sitemaps, which was touched on in the comments, will only work with URL's in the same domain, in other words the example.com sitemap should only contain links in the form of example.com/artistid then in the artists.example.com sitemap it should contain the links for artists.example.com, now since the only content that has already been generated is hosted in the S3 bucket and not on the application it would be safe to add the S3 bucket pages to the Google index directly. This could even be automated by re-generating the sitemap.xml file first, then using the Search Console API do a PUT request to https://www.googleapis.com/webmasters/v3/sites/siteUrl/sitemaps/feedpath where siteUrl is the root domain including the protocol such as http://www.example.com/ and feedpath is the full URL of the sitemap file such as http://www.example.com/sitemap.xml. As long as you are updating the lastmod field for the generated page to be the current date and any other pages that have been updated have their lastmod field updated to the right date Google will download a copy of the new sitemap file, and list all the new or modified pages for crawling.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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