TutorialsFebruary 28, 2026·8 min read

Rank Math SEO from Notion: Automate Your WordPress Meta Tags

Share

Rank Math is one of the most popular WordPress SEO plugins. It lets you set a focus keyword, SEO title, and meta description for every post. But if you write in Notion and publish to WordPress, filling in SEO fields manually in wp-admin after every sync defeats the purpose of automation.

With the right setup, you can define your SEO metadata in Notion and have it applied to Rank Math automatically when the post syncs to WordPress.

How It Works

Rank Math stores its SEO data as post meta fields in WordPress:

  • rank_math_focus_keyword — the target keyword for the post
  • rank_math_title — the SEO title shown in search results
  • rank_math_description — the meta description shown in search results

These fields can be set via the WordPress REST API — but they need to be registered first. By default, Rank Math doesn't expose them to the REST API.

Step 1: Register Rank Math Fields for the REST API

Add this to your WordPress theme's functions.php file (or use a code snippets plugin):

/**
 * Register Rank Math SEO meta fields for WordPress REST API
 */
add_action('init', function () {
    $keys = [
        'rank_math_title',
        'rank_math_description',
        'rank_math_focus_keyword',
    ];

    foreach ($keys as $key) {
        register_post_meta('post', $key, [
            'type'          => 'string',
            'single'        => true,
            'show_in_rest'  => true,
            'auth_callback' => function () {
                return current_user_can('edit_posts');
            },
        ]);
    }
});

This registers the three Rank Math fields as REST API-accessible post meta. The auth_callback ensures only users with editing permissions can write to these fields.

Step 2: Install Rank Math

If you haven't already:

  1. In wp-admin, go to Plugins → Add New
  2. Search for “Rank Math SEO”
  3. Install and activate the plugin
  4. Run the setup wizard — for most blogs, the default settings work fine

Step 3: Define SEO Metadata in Notion

The Notipo blog template includes an SEO Keyword property. For each post, fill in the focus keyword you're targeting — the same keyword you'd normally enter in the Rank Math panel in wp-admin.

When Notipo syncs the post to WordPress, it automatically sets:

  • Focus keyword — from the SEO Keyword property in Notion
  • SEO title — from the post title
  • Meta description — generated from the first ~160 characters of the post content

When you later publish the post, Notipo refreshes the meta description with the WordPress-generated excerpt for a more polished result.

Step 4: Verify It's Working

After syncing a post from Notion:

  1. Open the post in wp-admin
  2. Scroll down to the Rank Math SEO panel
  3. You should see the focus keyword, SEO title, and meta description already filled in
  4. The Rank Math score will reflect the automated metadata

Troubleshooting

SEO fields are empty after syncing

  • Make sure you added the register_post_meta snippet to functions.php
  • Verify the snippet is running — check for PHP errors in Tools → Site Health → Info
  • Clear any object caches (Redis, Memcached) after adding the snippet

Focus keyword shows but Rank Math score is low

Rank Math's score is calculated based on content analysis — keyword density, heading usage, image alt text, and more. The focus keyword sets the target; you still need to write content that Rank Math considers well-optimized for that keyword. Use the Rank Math panel in wp-admin to see specific recommendations.

SEO Tips for Notion Bloggers

  • One keyword per post — keep it focused. Don't try to rank for multiple unrelated terms in one article.
  • Use the keyword in your title — the post title becomes the SEO title, so include the keyword naturally.
  • Use headings — Notion H2 and H3 headings become WordPress headings, which Rank Math uses for content structure analysis.
  • Write a clear slug — fill in the Slug property in Notion with a clean, keyword-rich URL slug (e.g. rank-math-notion-seo).
  • Add alt text to images — Notion image captions become WordPress alt text, which helps with image SEO.

Getting Started

SEO metadata automation is available on both the Free and Pro plans. Create your account, connect Notion and WordPress, add the functions.php snippet, and your SEO workflow is fully automated. See the WordPress Setup guide for the full connection process.

Need help with the WordPress connection? Start with our application passwords guide. For the full Notion-to-WordPress workflow, see How to Publish from Notion to WordPress.

Ready to publish from Notion?

Set up in 5 minutes. Free plan available — no credit card required.

Get Started Free