1. Home
  2. Knowledge Base
  3. SEO Suite
  4. 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.

What Is a KML File?

Keyhole Markup Language or KML is an XML-based format that is used for storing geographic data and rendering information that is easier to read. This technology was acquired by Google and subsequently submitted to the Open Geospatial Consortium further.

KML files have either a .kml or .kmz (for compressed or zipped KML files) file extension. KML includes both vector and raster elements such as points, lines, polygons, and imagery, as well as related content like graphics, pictures, attributes, and HTML.

KML is more than a way to store map coordinates. KML files are like HTML, and only comprise links to icons and raster layers. 

What Are the Benefits of a KML File?

KML files display your business’s geographic details in such a way that it’s interoperable with other applications like Google Maps and Google Earth. Google verifies your business listing and location with the help of these KML files.

Not only this but it also contains instructions for how to display the location, like marker color and style. You can also read more about KML in this KML documentation maintained by Google.

KML Files in Rank Math

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

Related Articles