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.
Table Of Contents
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
2.1 Navigate to Security in Cloudflare
To begin, navigate to the Security section in your domain’s Cloudflare dashboard and select Security rules, as shown below.

2.2 Create a New Custom Rule
Under the Security Rules section, click the Create rule button and select Custom rules from the pop-up.

Although you can’t include all REST endpoints due to Cloudflare’s limit of 5 custom rules for free users, we recommend using the version below, which should match most Rank Math endpoints:
http.request.uri.path wildcard r"*/wp-json/rankmath/*"
On the New custom rule page, give the rule a descriptive name, such as Whitelist Rank Math.
Next, go to the Incoming request match fields and:
- Select URI Path as the Field.
- Leave Wildcard as the Operator.
- Paste
*/wp-json/rankmath/*
in the Value field. - Click the Or button.
Everything should now look like the example shown below.

Once you’re done, check the Expression Preview to confirm it matches the snippet we provided earlier. If it does, you’re good to go.
3 How to Exclude Sitemaps in Cloudflare
To exclude your sitemap from being cached or blocked by Cloudflare, add a custom rule with the snippet below:
http.request.uri.path wildcard r"*/sitemap_index.xml"
To do this, while still on the New custom rule page:
- Click the Or button.
- Select URI Path in the Field option.
- Leave the Operator as Wildcard.
- Paste
*/sitemap_index.xml
in the Value field.
Once done, check the Expression Preview to ensure everything looks correct.

4 Whitelisting Rank Math’s IP Address in Cloudflare
You may also 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 this, still on the New custom rule page:
- 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
The Expression Preview should display:
(ip.src eq 172.66.40.202) or (ip.src eq 172.66.43.54) or (ip.src eq 193.138.6.5) or (ip.src eq 204.48.29.92)

Finally:
- Set the action to Skip.
- Ensure Log matching requests is toggled on.
- In the WAF components to skip section, select All remaining custom rules, All managed rules, and All Super Bot Fight Mode Rules.
Once everything is configured, click Deploy.

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…