So,
I took over a old e-com site several month ago to rewrite complete code base and by the glorious request of the new owner there needs to a SITEMAP.xml included as a part of a project reqs.
The site itself is not a bid one, maybe 2000 pages, plus small plus, most are product URIs.
The way is at this point is there are 2 pages per product, 1 for main product page and one with large images for the product.
Like this:
/product.url/productID=nn
/product.url/productID=nnn&showImages=true <<<--these type was kind of thin content pages but have tons of links to them due to HQ images being displayed
The new Product URI will include:
/product-name-productID.html
Both of Old URIs will be redirected to one New one via 301.
This site never had a sitemap and I have full control programmatically when and where old URLs are in the code and when they simply become New URIs.
The way I used to do it on other old sites is to wait at least 4-5 time when old URIs get re-crawled and then flip them to new URI structure from within entire site.
Kind of took a while, but now the Question is about SiteMap file:
To start with: New SiteMap file will be generated for the OLD URIs and fed to SEs before we go with new URI structure(and merged pages), or should we?
What do I do with Old URIs within SiteMap once they are (recorded to 301) re-crawled, should I drop and replace refs with in the code and should I leave refs in SiteMap with addition of New URIs within.
Should I add
<link rel="canonical" href="https://www.aexample.com/newURI.html">
to old set of URIs before they get crawled?
More questions to add later, its a start.