I am building a single page app (SPA) with Angular
. The data to be displayed inside the app is fetched from the backend using REST
calls. It concerns a social media website which means it will have a lot of user generated pages.
This also means that the sitemaps
can become very large making it unfeasible to package them in the angular app itself. Also the content of the sitemaps can become out of date rapidly because users will be constantly adding, updating or removing their user generated content.
Right now i'm storing my sitemaps in an amazon s3 bucket
but people who answered this question say google
ignores cross-domain sitemaps.
So how should i offer large sitemaps for an SPA? I have an EC2
instance in the backend that receives the REST calls. This instance also autogenerates the sitemaps periodically and puts them in a folder called static/sitemaps
that is also exposed to the internet. Could i use my EC2 instance to offer the sitemaps or would that be the same thing as using a s3
bucket. I'd prefer not to offer the sitemaps from EC2
because storage on EC2
is more expensive then it is on s3
.
The last thing i could do is create a subdomain for the sitemaps. For instance sitemaps.example.com
next to the example.com
domain. Perhaps i could redirect crawlers visiting sitemaps.example.com
to the sitemaps index file that is stored in my s3 bucket. But i'm not sure whether that works either.
So the question is; For a single page app, What is the proper way to offer large sitemap.xml files to webcrawlers?
Thank you