1. Home
  2. Knowledge Base
  3. How to Create a KML Sitemap using Rank Math

How to Create a KML Sitemap using Rank Math

In this tutorial, we’ll discuss how to create a KML Sitemap using Rank Math.

Note: This feature is only available in Rank Math PRO.

Rank Math adds the KML file automatically when the Local SEO module is enabled. You can enable it from Rank Math > Dashboard > Modules as shown below:

Enable Local SEO Module

Then navigate to Rank Math > Titles & Meta > Local SEO and select Organization in order to view the geo-coordinates option.

Enable Organization

How to Add KML for Your Local Business?

At first, add geo-coordinates by navigating to WordPress Dashboard > Rank Math > Titles & Meta > Local SEO. Please refer to this guide from Google on how to find your business location’s geocoordinates.

Add Geo Coordinates


You can also check our guide on how to setup Local SEO that will help you understand the Local SEO settings in detail. Once you have added the Geo Coordinates please save your page and then check your KML.

Please note: If you fail to enter or enter incorrect geo-coordinates, a blank KML file will be created.

Here’s an example of a KML File:

example of KML File

If Geo-Coordinates are missing, a blank KML file will be created. We update it with multiple location data including Geo Co-Ordinates when you use Multiple Locations CPT.

We’ll now show you how to add KML for multiple locations.

How to Add KML for Multiple Locations?

Add geo-coordinates by navigating to WordPress Dashboard > Rank Math > RM Locations. Edit the location and go to Rank Math’s Schema Tab and click on Schema Generator as shown below:

Click on Schema Generator

Add the Geo Coordinates in the Schema Builder and click on Save for this Post once you have made the changes. You can go through our guide on how to create multiple locations with the help of Rank Math if you are creating multiple locations for the very first time.

Add Geo Coordinates in Schema Builder

Once you’ve added the geo-coordinates, then you can check the KML and you will see each location as shown below:

KML file lists all the locations

Filter to Add Locations KML File in the Sitemap

With the help of the Rank Math SEO plugin, you can also make use of the below filter in order to add locations KML file in the Sitemap.

/**
 * Filter to add Locations KML file in the sitemap
 */
add_filter( 'rank_math/sitemap/locations', '__return_true' );

However, if you still have any queries please feel free to contact our support team and they’d be happy to help you at any given time.

Was this article helpful?

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket