@clarnx Awesome, that worked perfectly! I deleted the old site and deployed the site through Github. I also added the custom domain to the site etc. One last question, the sitemap being generated lists the url’s of the site before the custom domain was added. Is there a way to prompt the sitemap to update?
Edit: I redeployed and it resolved the issue. Thank you for taking the time to assist me.
Thanks for the excellent debugging here, @clarnx . Glad everything is working now, @CitrineDragon-- happy building
Hi @clarnx @CitrineDragon
I have the same problem installing my Sitemap to my google search console and Yandex, I followed all the step, but still don’t work, I also installed some sitemap plugin but doesn’t work can I have help thanks
If possible can you share your repository for me to help with the debugging.
Here’s what worked for me:
- Deploy your site through Netlify via GitHub (very easy following the article that @clarnx linked in a previous reply.)
- Install the sitemap plugin in Netlify created by NetlifyLabs
- Verify that your sitemap has generated by adding /sitemap.xml to your site url.
- Copy that url into Google Console and it should work.
- If you still get an error in Google Console add another / to the end of your url /sitemap.xml/
thanks for your reply @clarnx
this is my repository : https://github.com/Mohammedeljaoui/mohammed
Thanks @CitrineDragon but still doesnt work and show me this
Try putting the full url on the Google Console. Ex: https://www.google.com/sitemap.xml/
@CitrineDragon @clarnx friend can i know from were can i take this setting
I believe those settings will work. After you deploy the site, are you able to see the sitemap?
Post the url to the site, once it’s been deployed.
Hello @maroc.yes.1993, You can leave the settings blank and just continue with the deployment.
It should work as expected.
hi @clarnx i do the same but still doesn’t work there are other solution,thanks
Hi @maroc.yes.1993, thanks for the feedback.
Kindly try the solution in the related post below to see if it helps.
thanks so much @clarnx I will try all the steps that you write me, thanks again
Hey @clarnx I read through this forum and clicked the link you provided. I primarily want to use Netlify’s plugin since it automatically updates the sitemap. Our site has been deployed properly through Github, changes are updated automatically without issue in Netlify. Following your instructions after installing the plugin, my entire netlify yoml file has the following:
command = “npm run build”
publish = “build/”
functions = “functions/”
package = “@netlify/plugin-sitemap”
buildDir = “.”
However a sitemap does not generate at the following URL:
I’ve installed the plugin via your UI not the cmd line. What would you recommend?
Update So I got the sitemap to generate by changing my buildDir to =“build”. But the XML is empty, perhaps because svelte files are well… svelte files and not .html?
Either way, I don’t think Netlify’s plugin is meant to be user friendly, my recommendation is to have an interface that asks for the framework a user is using and adapt the plugin that way. I will attempt to use a different dependency built for the framework i’m using like svelte-sitemap on NPM.
You’ll want to change the
buildDir to the same value as the publish directory set via
publish @valentino. See full documentation
@jasiqli I didn’t code the site, but it’s built on svelte, the publish directory could therefore be either “build” or “public”. Not sure where to look. However it is odd, because according to the documentation it should inherit the site build setting on its own.
Do you know if the default path is sitename.topdomain/sitemap.xml ?
Also how long does it typically take to generate the sitemap?
Because so far nothing happened after pushing “public” as the buildDir, Netlify recognized the change 10 minutes ago.
Is the Svelte site generating static files with a
.html extension? My guess (without seeing the project) is probably not (based on past encounters.)
There is a
sveltekit-sitemap plugin and documentation on the SvelteKit site regarding sitemaps. These are quite possibly more appropriate options for the project.
From memory, it is done as part of the build.
my static folder looks like this, however the code is svelte not
sveltekit (just realized there’s a difference). So “public” should be the correct path for buildDir (which I had updated and the issue persisted).
A screenshot provides no useful information. A link to a repository would provide useful information.