I have a single page application built using React library (Create React App is used). And I have different routes inside the application which I am resolving using React Router, for instance http://<domain-name>.com/faq. Server side rendering is not used and right now I don't have a possibility to use it.
I want inner pages of that application to be indexed by Google search engine. In order to do that I did the next things:
- Make inner pages (for instance
/faqpage) accessible via their routes - Created
sitemap.xmlfile insidepublicfolder so that when the application is built Create React app puts this files into/buildfolder right afterindex.htmlfile
Sitemap file contains:
<?xml version="1.0" encoding="utf-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
>
<url>
<loc>https://www.<domain-name>.com</loc>
<priority>1</priority>
</url>
<url>
<loc>https://www.<domain-name>.com/faq</loc>
</url>
</urlset>
Where <domain-name> is a real domain name. I omited the rest of the pages here for the sake of simplicity.
But unfortunately those pages are not being indexed by Google search engine even a week after I deployed this application. So I decided to use Google search console (https://search.google.com/search-console/welcome) and found that all of my inner pages are not found.
So my question is how to make pages listed in the sitemap file to be indexed by Google search engine?
NOTE: I am not sure if it's important or not, but when I open FAQ page in the browser and open Chrome dev tools, I see that there is a request to the document /faq and 404 response

