3

I have a site where I create new URLs based on new questions asked. I am trying to add the new URLs created to sitemap.txt and submit them to Google Search Console.

I am generating new URLs and new URLs are being written on the back end in to a file called sitemap.txt but I don't know how to connect it to Google Search Console.

I have my front end in firebase made with react JS and back end is express.js and is hosted in Heroku. I have added my site's URL to Google Search Console.

The periodically generated sitemap.txt is in express.js as show in the screen shot below. In the second image you can see that I have added https://askover.herokuapp.com/sitemap.txt in Google Search Console under my site's property.

What am I doing wrong here? How can I set it up such that new URLs added to the sitemap will be re crawled by Googlebot to index in Google?

sitemap in express.js

enter image description here

9
  • Sitemaps have almost nothing to do with SEO. They don't help your pages rank better and they rarely get search engines to index pages they wouldn't index anyway. At best sitemaps get search engine crawlers to crawl new pages quickly and give you extra stats in webmaster tools and search console. See The Sitemap Paradox Dec 25, 2021 at 18:07
  • so how would u do it if ur having this website how would u make ur inner pages avaiable to googlebots to be craweld
    – vivek kn
    Dec 26, 2021 at 5:31
  • The best way is to create good information architecture. Every page should have links to and from several other pages. That is why this page has the "Related" list of questions. Dec 26, 2021 at 10:27
  • dude i am using a react js app and i have difderct links for all pages but it will not get indexed because reactjs act as a single file when created the app that why i am asking how to crawl my app ur answes are not helping
    – vivek kn
    Dec 26, 2021 at 12:25
  • Using a JS framework does make SEO harder. Google can now crawl such sites providing that: 1. You change the URL when content changes 2. You show the content relevant for the URL when the page loads. 3. You use <a href="..."> in the DOM, even if you intercept the clicks and load the content using JS for users. Even with React, sitemaps won't help much and you still need to link your pages together. Dec 26, 2021 at 23:23

1 Answer 1

1

In search console, you can only upload a sitemap.xml hosted on the declared domain. You may already guessed it, but the first part is to confirm this fact.

First of all, you're trying to upload a sitemap.txt, we mostly use a sitemap.xml (i can see you've on responding on : https://wixten.com/sitemap.xml) If you can't use this one, generate something like https://wixten.com/sitemap-custom.xml)

Here are multiple solution you may try :

1 - Setup a task in you backend that upload the xml in your front once generated.

If not possible : 2 - create a new path on the front like sitemap-custom.xml and before returning the content to the front include all information that you backend with recover by including https://askover.herokuapp.com/sitemap.txt

3 - Try to be a bit tricky, add a redirection like this on the front :

RewriteRule (|\/)sitemap-custom.xml https://askover.herokuapp.com/sitemap.txt [L,NC,QSD]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.