How to create a sitemap for your react application | create-react-app

SoulCoder
1 min readDec 28, 2021

--

Hello people,

If you want to add a sitemap to your website which has been created using create-react-app then read below mentioned documentation. Here we will generate a sitemap and use that as our sitemap.

Step 1: You must have a application created with react.

Step 2: Create a file and name it as sitemap.xml or simply generate it through https://www.xml-sitemaps.com/

Step 3: Navigate to your folder structure of application and add this file (sitemap.xml) in to your public folder where there is index.html file.

Step 4: Go to google search console (sign in , if not) and click on sitemap which is on left side panel.

Step 5: Append /sitemap.xml

That was it!

If you want to test whether your sitemap is accessible or not, you can check it as well. Just go to any browser and enter your website url and append sitemap.xml in the end i.e. yourCoolWebsite.com/sitemap.xml

There you go. You should see an xml file .

Thank you!

--

--