🎃 [HALLOWEEN SALE] DISCOUNT! + 2x Benefits + $15k Worth of Offers for FREE

LEARN MORE!

How to Whitelist Rank Math in Cloudflare

Rank Math uses REST API requests to fetch & update data on your website. So, if you’re using Cloudflare, there is a chance that it may block some of the REST API requests.

In this knowledgebase article, we’ll show you how to whitelist Rank Math in Cloudflare.

1 Rank Math’s REST API Endpoints

Here’s the complete list of REST API endpoints that Rank Math uses. (Note: This list is only for reference; you don’t have to whitelist them manually one by one, as we’ll walk you through the most effortless way below).

/rankmath/v1/
/rankmath/v1/saveModule/
/rankmath/v1/autoUpdate/
/rankmath/v1/toolsAction/
/rankmath/v1/updateMode/
/rankmath/v1/dashboardWidget/
/rankmath/v1/updateSeoScore/
/rankmath/v1/disconnectSite/
/rankmath/v1/getFeaturedImageId/
/rankmath/v1/updateRedirection/
/rankmath/v1/updateMeta/
/rankmath/v1/updateSchemas/
/rankmath/v1/updateMetaBulk/
/rankmath/v1/saveTemplate/
/rankmath/v1/getVideoData/
/rankmath/v1/an/
/rankmath/v1/an/getKeywordPages/
/rankmath/v1/an/postsOverview/
/rankmath/v1/an/getTrackedKeywords/
/rankmath/v1/an/getTrackedKeywordsRows/
/rankmath/v1/an/getTrackedKeywordSummary/
/rankmath/v1/an/trackedKeywordsOverview/
/rankmath/v1/an/addTrackKeyword/
/rankmath/v1/an/autoAddFocusKeywords/
/rankmath/v1/an/removeTrackKeyword/
/rankmath/v1/an/deleteTrackedKeywords/
/rankmath/v1/an/getPagespeed/
/rankmath/v1/an/postsRows/
/rankmath/v1/an/inspectionStats/
/rankmath/v1/pingSettings/
/rankmath/v1/an/dashboard/
/rankmath/v1/an/keywordsOverview/
/rankmath/v1/an/postsSummary/
/rankmath/v1/an/postsRowsByObjects/
/rankmath/v1/an/post/(?P<id>\d+)/
/rankmath/v1/an/keywordsSummary/
/rankmath/v1/an/analyticsSummary/
/rankmath/v1/an/keywordsRows/
/rankmath/v1/an/userPreferences/
/rankmath/v1/an/inspectionResults/
/rankmath/v1/an/removeFrontendStats/
/rankmath/v1/ca/
/rankmath/v1/ca/researchKeyword/
/rankmath/v1/ca/getCredits/
/rankmath/v1/in/
/rankmath/v1/in/submitUrls/
/rankmath/v1/in/getLog/
/rankmath/v1/in/clearLog/
/rankmath/v1/in/resetKey/

2 Whitelisting Rank Math in Cloudflare

To begin with, navigate to the Rules section in your domain’s Cloudflare dashboard, as shown below.

Navigate to Rules section

2.2 Create New Page Rule

Under the Page Rules section, click the Create Page Rule button.

Create Page Rule

While it’s not possible for you to include all those REST endpoints as Cloudflare limits only to 3-page rules for free users, we suggest you include the below REST endpoint version that’ll try to match all endpoints from Rank Math.

https://example.com/wp-json/rankmath/v1/*

Ensure that you replace example.com with your domain name.

Next, in the field “Then the settings are:” choose Cache Level and select Bypass as the cache level, as shown below.

Whitelist Rank Math in Cloudflare

2.3 Deploy Page Rule

After adding the necessary settings, click the Save and Deploy button.

Save Page Rule

3 How to Exclude Sitemaps in Cloudflare

To exclude your sitemap from being cached by Cloudflare, add the Page Rule with a Cache Level of Bypass followed by any of the below regex patterns your sitemap URLs follow.

sitemap?\.xml?
[a-z0-9_\-]*sitemap[a-z0-9_\-]*.(\xml|xsl)?
([az0-9_\-]*?)sitemap([a-z0-9_\-]*)?.xml

For instance, here’s how the Page Rule will look in Cloudflare.

Create a Page Rule to exclude sitemap

4 Whitelist Rank Math’s IP Address in Cloudflare

You might need to whitelist the following IP addresses in Cloudflare:

  • rankmath.com – 172.66.40.202
  • rankmath.com – 172.66.43.54
  • rankmath.com – 193.138.6.5
  • auth.rankmath.com – 204.48.29.92

To do so, navigate to Security → WAF and click Create rule button from your Cloudflare dashboard, as shown below.

Create a firewall rule

Next, add a descriptive name to your firewall rule and then set the condition as follows:

  • Field – IP Source Address
  • Operator – equals
  • Value – 172.66.40.202
  • (Or) – 172.66.43.54
  • (Or) – 193.138.6.5
  • (Or) – 204.48.29.92
Add firewall rule

Finally, set the condition to Skip, choose All managed rules under WAF components to skip, and click the Deploy button.

And that’s it! If you still have questions about whitelisting Rank Math in Cloudflare– you’re always more than welcome to contact our dedicated support team. We’re available 24/7, 365 days a year…

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Learn more about the PRO Version

Still need help?

?

Submit Your Question

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

Open Ticket

Related Articles