• Resolved ofmarconi

    (@ofmarconi)


    I have some Types posts that I would like to include to Crawler, I don’t want to render the whole site, just the pages + 2 CPT.

    It’s possible?

    Use Rank Math

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support qtwrk

    (@qtwrk)

    you can create a parent sitemap xml

    then in this parent xml , includes your normal sitemap and also this second sitemap.

    Thread Starter ofmarconi

    (@ofmarconi)

    Sorry, but I have no idea, with Rank Math itself, can you do this?

    Thanks!

    @ofmarconi

    are you able to generate a *.xml by hand? If yes, it is quite simple to add your 2 CPT (wtf is CPT?) to the crawler.

    Example for a custom sitemap.xml

    <?xml version="1.0" encoding="utf-8"?>
    <urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
    	<url>
    		<loc>https://www.domain.com/whateverurl_1/</loc>
    		<lastmod>2022-07-21T09:55:58+02:00</lastmod>
    	</url>
    	<url>
    		<loc>https://www.domain.com/whateverurl_2</loc>
    		<lastmod>2022-07-21T09:55:58+02:00</lastmod>
    	</url>	
    </urlset>

    You only have to replace domain.com with your own domain and to modify the date.

    Thread Starter ofmarconi

    (@ofmarconi)

    LOL!

    Got it, sorry, my fault, you’re right.

    (2 Custom Post Type’s)

    If I understand correctly, then I can continue using the Rank Math XML, I’ll just add the sitemaps I want Crawler to execute inside my XML.

    thx so much

    Thread Starter ofmarconi

    (@ofmarconi)

    Manually it will not update automatically as Lastmod will always need to be modified manually as well.

    example:

    <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//cepeda.law/main-sitemap.xsl"?>
    <sitemapindex xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
    	<sitemap>
    		<loc>https://cepeda.law/nossos-profissionais-sitemap.xml</loc>
    		<lastmod>2022-06-09T11:04:08-03:00</lastmod>
    	</sitemap>
    	<sitemap>
    		<loc>https://cepeda.law/areas-de-atuacao-sitemap.xml</loc>
    		<lastmod>2022-07-20T14:19:16-03:00</lastmod>
    	</sitemap>
    	<sitemap>
    		<loc>https://cepeda.law/category-sitemap.xml</loc>
    		<lastmod>2022-06-20T18:25:41-03:00</lastmod>
    	</sitemap>
    </sitemapindex>
    <!-- XML Sitemap generated by Rank Math SEO Plugin (c) Rank Math - rankmath.com -->
    • This reply was modified 2 years, 4 months ago by ofmarconi.

    If I understand correctly, then I can continue using the Rank Math XML, I’ll just add the sitemaps I want Crawler to execute inside my XML.

    Not at all, but almost. ?? You can continue using Rank Math without changing anything. If you modify the sitemap generated by Rank Math it will be overwritten by Rank Math next time if something is updated, so leave it as it is.

    What you have to do is to generate a custom sitemap file with your 2 CPT like shown above. The next is to generate a index sitemap that contains the URLS to Rank Math XML and your custom XML file like this.

    <?xml version="1.0" encoding="UTF-8"?>
    <sitemapindex xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
    	<sitemap>
    		<loc>https://www.domain.com/your_default_sitemap_generated_by_RankMath.xml</loc>
    		<lastmod>2022-04-30T08:15:26+00:00</lastmod>
    	</sitemap>
    	<sitemap>
    		<loc>https://www.domain.com/your_custom.xml</loc>
    		<lastmod>2022-04-30T08:15:26+00:00</lastmod>
    	</sitemap>	
    </sitemapindex>

    Name this sitemap sitemap_index.xml and add this sitemap to the crawler. That’s it.

    Thread Starter ofmarconi

    (@ofmarconi)

    thx so much!!!

    Does it work?

    Thread Starter ofmarconi

    (@ofmarconi)

    Yes!

    Okay, you are always welcome!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How can I insert more than 1 sitemap on Crawler?’ is closed to new replies.