-
Hi, I am wondering around for a while now, toke a look at previous topics around this very same issue and unfortunatelly, i didnt get how to create my own sitemap to later add my dinamic custom page links to it.
It is really possible to create a sitemap and later add the urls to it, or we can just create the sitemap, with the urls allready in it ?if so, i would like the have step-by-step of it, not the generics we allways find on rank maths documentation.
(The standard documentation, lacks a lot on some details)Thanks a lot in advance, cheers guys
-
Hello,
Thank you for contacting Rank Math today.
If you want to generate your sitemap with Rank Math you can enable that module under WordPress Dashboard > Rank Math > Dashboard:
After doing that you’ll have access to all the settings by going to WordPress Dashboard > Rank Math > Sitemap Settings.
Lastly, if you want to add more URLs to the sitemap that Rank Math generates you can use the following filter: https://rankmath.com/kb/filters-hooks-api-developer/#add-extra-urls-in-sitemap
In case you are talking about creating a custom sitemap on your own without relying on Rank Math, we can’t provide support for that as it falls outside the scope of our plugin.
Hope this helps clarify your doubts.
Don’t hesitate to get in touch if you have any other questions.
Hi guys,
I am already using the Rank Math’s generated and correctlly configured sitemaps, and i like it, i dont want to replace them.
I just want to add a few more dinamiclly generated pages to a specisific sitemap, adding it to the rank math’s sitemap_index.xml.
Its tree diferent scope dinamiclly generated pages, and i would like to keep close eye on them, and the best way to do it, is generating a specific sitemap for eatch of them.
I was wondering, in the method dewscribed here, How to Create a Custom Sitemap and Include it in Rank Math the following doubths:
If i rename the “custom-sitemap.php” file, for example to “my-dinamic-pages-1.php” and “my-dinamic-pages-2.php” does it means, two diferent sitemaps manageable by rank math ?
Thanks in advance, cheersHello,
Thank you for getting back to us.
With Rank Math it is only able to generate the sitemaps from the usual post/pages structure, you would need to create some custom sitemap either from a plugin or via your suggested method here.
After that, you could add that sitemap to the sitemap_index.xml file generated by Rank Math (the only one you have to add to Google Search Console).
Please refer to this thread: https://support.rankmath.com/ticket/adding-extra-sitemap_own-xml-to-sitemap_index-html/
If i rename the “custom-sitemap.php” file, for example to “my-dinamic-pages-1.php” and “my-dynamic-pages-2.php” does it means, two different sitemaps manageable by rank math ?
Sure but you have to apply each step to every individual sitemap that you create. You can not of course combine the steps for both of your sitemap files here.
Hope this is more clear. Please let us know if you have any other questions.
Thank you.Hey guys,
Just for recap, and see if i got it right (and please do correct me if i am wrong), and to other people hwo may need clarifying on the matter…– First step is to create a “sitemap-my_custom.php” with the prtended urls in it.
(create as many sitemaps as you need)– Second step is to use the following filter to add it to the index of the Rank Math’s “sitemap_index.xml” like this 18. Filter to add external Sitemap to the Rank Math Sitemap.
(use this filter as many custom sitemaps you created)And finally
– Third step is to add the “include_once ‘sitemap-my_custom.php’;” followed by the filter as mentioned on manual How to Create a Custom Sitemap and Include it in Rank Math.
(use this filter as many custom sitemaps you created)If its correct, could you please tell me, if after i done all the process, do i need to remove the codes from some of steps above, or do i need to let the code there(in “functions.php” file) for ever ?
Thanks a lot, for the support so far, Cheers
Hello,
Thank you for getting back to us.
What you have mentioned here is much or less the same as the correct procedure to follow. Am assuming in your case you want to create multiple custom sitemaps with additional links.
Thus if you want to add the first sitemap say
newdynamic-sitemap.xmlto the RankMath sitemap_index.xml here are the steps you can follow:Create the
my-dinamic-pages-1.phpfile in your child theme and add this snippet code.Next, you need to call this file in your child theme’s functions.php file thus you need the include once code listed here. In this step make sure you replace
sitemap-custom.phpwithmy-dinamic-pages-1.php.Then to precisely create the sitemap file:
newdynamic-sitemap.xmlyou need to add this code to the functions.php file of your child theme.All links bearing the
example.comdomain should be replaced with the custom links you want to add. You should then repeat the same process for any other sitemap file you wish to add.Also, note that you should not remove these codes as it will only result in the sitemap disappearing from your main sitemap_index file.
Hope this helps. Please let us know if you have any other questions.
Thank you.Hi Guys,
Its very nice of you on helping us like this, thanks a lot, in advance.
This weekend, i will take all the leraning here with you, and put it on working.
One more last question i think,…:After doing the procedures on creating the sitemaps, can i use This code at the end, to add all of the sitemaps at once ?
Cheers guys
Hello,
Thank you for getting back to us.
Yes, you can add the code as well to make sure that it is added in the main sitemap_index file. However, please also make sure that the External Providers do match in terms of labeling.
Hope this is helpful. Please let us know if you have any other questions.
Hey, hi,
Please dont close the topic yet please, i may need some further help from you guys.
I am around, i didnt forget the task, just didnt had time to implement it yet.
Sorry
Looking forward to implement it, in the 2 or 3 days max.Thanks in advance
Cheers guys
Hello,
Thank you for keeping in touch with us.
Keep us in the loop of how this goes. We will keep this ticket open for you and if you have any further question(s), please let us know.
Thank you.
Hi guys, thanks for the patience and for the GREAT support so far.
I was finally able get some time to put it all together, sucessefully.
But still there are three things that i would like to know a bit more about:1- Do the function “get_sitemap_links()” function allow us to add more than “loc” on URL added , things like; “lastmod”, “changefreq” and “priority” (if so, how shoul i do) ?
2- If I use the function “get_sitemap_links()” will it be faster than the filter “rank_math/sitemap/providers” on “functions.php” file ?
3- When we update a page/post, Rank Math pings the search engines(Google and Bing), on the specific updated page/post, or do Rank Math sends a ping to them on the sitemap file specific, where the updated page/post is listed ?
Thanks Once More,
Please do keep Up with your GREAT JOB on supporting Us.
Cheers guysAnd, there is this 2 more questions, and MOST IMPORTANT ONES:
(Questions raised by This Topic Here)
Everitime my site loads, it updates my custom sitemaps links (because I added the links to them trough the filter on “functions.php” file).
(Please do correct me if I am Wrong)4- Will Rank Math ping Google and Bing, if I have turned on the “Ping Search Engines” on settings ?
5- If so, even if the “lastmod” as the same “timestamp” of the previus time, my site loaded ?
(Please guys, take as much time as you need)
THANKS A LOT…!!!
And
BIG CheersHello,
Thank you for getting back to us.
Do the function “get_sitemap_links()” function allow us to add more than “loc” on URL added , things like; “lastmod”, “changefreq” and “priority” (if so, how shoul i do) ?
Sure you can add several URLs if that what you mean. loc attribute is just a closing the URLs added. You can as well decide to edit the last mod. Please check more about this here: https://www.sitemaps.org/protocol.html
If I use the function “get_sitemap_links()” will it be faster than the filter “rank_math/sitemap/providers” on “functions.php” file ?
What do you mean faster, these two functions should work hand in hand in this sitemap creation process. The get sitemap link is used for defining the links in your custom sitemap
When we update a page/post, Rank Math pings the search engines(Google and Bing), on the specific updated page/post, or do Rank Math sends a ping to them on the sitemap file specific, where the updated page/post is listed ?
Once a post is updated the Rank Math plugin pings search engines like Google once it detects an update on the sitemap file where that page/post is listed either on the post or page sitemap.
Will Rank Math ping Google and Bing, if I have turned on the “Ping Search Engines” on settings ?
Yes so long us the links appear in the sitemap then Google will be pinged on an update of the posts of that sitemap so long as you have added them.
The XML tag definitions as well might have to be updated manually unless these functions are being called from a custom post type.
Hope this helps. Also, the code shown here is only mean to add multiple sitemap links. It has to be integrated with your custom PHP file for it to show the individual links per the custom sitemap file created.
Hope that helps. Please let us know if you have any other questions.
Hey guys, thanks a lot for the great support so far.
With your great help, I managed to sucessefully create all my desired sitemaps as I wanted. You can see it now here in action.
Thanks a LOT guys.!
I would like to just to clarify a litle bit, some of the questions and ideal answers/solutions or aproatches and end here the topic, with great satisfaction.
In related to question 1:
I was wondering about “lastmod”, “chf” and “pri” attributes, that i leran here, that are deprecated now.In related to question 2:
The question was more or less about page load relevance, witch makes no diference.In related to questions 3, 4 and 5:
The questions were more or less about how many pings would Rank Math send to search engines by updating a single post/page/category in a sitemap file with thousands of urls.
I learned that its irrelevant by other common sence reasons (one of them being, if was problem, mal intended webmasters, could damage any website, by sending zilions of pings to other websites).Rank Maths is the best, their Support team too are the Best.!
Please do keep up with the GREAT JOB guys !
God bless you allCheers
Hello,
Thank you for getting back to us.
We are glad that you were finally able to create the custom sitemaps here and we just inspected them. Upon doing a test the main sitemap seems to be validated as expected too: https://i.rankmath.com/CKd78i
On the query of the “lastmod”, “chf” and “pri” attributes Rank Math only includes the lastmod as you could see from the code shared.
We appreciate your input and research on this issue as well and you are much welcome to let us know, should you have any other additional questions.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.
The ticket ‘Custom sitemap creating’ is closed to new replies.