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

dan
  • 15,123
  • 11
  • 44
  • 52
vivek kn
  • 209
  • 1
  • 4
  • 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 – Stephen Ostermiller Dec 25 '21 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 '21 at 05: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. – Stephen Ostermiller Dec 26 '21 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 '21 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. – Stephen Ostermiller Dec 26 '21 at 23:23
  • so ur telling adding sitemap to google serch console is of no use – vivek kn Dec 27 '21 at 07:04
  • Sitemaps can give you extra stats in GSC. They can get Googlebot to come crawl all your URLs. They tell Google about your preferred canonical URLs. They are useless for getting pages indexed and ranked well. – Stephen Ostermiller Dec 27 '21 at 09:51
  • well that is what i want i want the google bots to crawal in m site for that i am asking u how to add that file to google serch console – vivek kn Dec 27 '21 at 12:39
  • @StephenOstermiller i fixed https://ask-over.herokuapp.com/sitemap.txt now urls are loading in this link but i am still not able to add the url into serach console – vivek kn Jan 01 '22 at 06:42

1 Answers1

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]
Patrick Valibus
  • 544
  • 2
  • 8