Overview


1. Create sitemap.xml

Go to xml-sitemaps.com. Enter your site url and click START. Follow the instructions and download the generated sitemap. Save as sitemap.xml in your project /src folder.


2. Modify angular.json

Open angular.json and in architect.build.assets add this line:

"src/sitemap.xml"


3. Modify robots.txt

Open robots.txt and add this line:

If you don't have robots.txt, see this page: Robots


4. Test

Build and deploy your project online. Go to a sitemap validator tool, such as validate-xml-sitemap, and test your url.


Next

Add Google Analytics





Reference

sitemaps.org