Bare Bones SEO doesn’t build heavy, parallel systems to run your site. WordPress already has incredibly fast core engines built into it for sitemaps, routing, and error handling.

We simply tap into those native engines and give you the manual dials to tweak them. Here is how it works under the hood.

How the Sitemap Exclusion Works

The Native Setup: Modern WordPress automatically generates a dynamic XML sitemap on the fly whenever a search engine asks for it. It doesn’t use physical files on your hard drive, which is great for speed.

Our Tweak: Instead of writing a separate sitemap system, we drop a tiny filter into WordPress’s native query loop. When a bot requests the sitemap, our code tells WordPress: “Hey, run your normal process, just skip the IDs where the user checked the exclude box.”

add_filter( 'wp_sitemaps_posts_query_args', 'bare_bones_exclude_from_sitemap' );
function bare_bones_exclude_from_sitemap( $args ) {
    $args['meta_query'][] = [
        'key'     => '_bare_bones_no_sitemap',
        'compare' => 'NOT EXISTS',
    ];
    return $args;
}
  • Why it’s fast: Your server does zero background file writing. The tweak happens entirely in temporary server memory for the split second it takes to serve the bot.

How the 301 Redirect Works

The Native Setup: WordPress handles URL routing and headers through its core template_redirect engine, which runs 24/7 on every page request. It also includes wp_redirect(), a highly optimized, built-in function specifically engineered to safely handle traffic detours and send clean HTTP status codes.

Our Tweak: Native WordPress only tracks redirects for changed URL slugs tied to active Post IDs. It completely fails if you delete a page, need to map an external link, or want to redirect dead paths from an old site layout.

Bare Bones SEO doesn’t build a heavy custom database router to fix this. Instead, we map your custom redirects as a simple, text-to-text array inside a single row in the native options table. We plug directly into the native template_redirect loop, check your array in memory, and instantly hand the path over to WordPress’s native wp_redirect() engine to execute the detour.

add_action( 'template_redirect', 'bare_bones_handle_redirects' );
function bare_bones_handle_redirects() {
    $redirects = get_option( 'bare_bones_redirects', [] );
    $current   = $_SERVER['REQUEST_URI'];
    // Direct text-match lookup within WordPress's core routing engine
    if ( isset( $redirects[ $current ] ) ) {
        wp_redirect( $redirects[ $current ], 301 );
        exit;
    }
}

Why it’s fast: There is no heavy database table scanning or background activity. We bypass the restrictive Post ID lookup entirely. Because WordPress is already processing this routing step on every single visit anyway, our tweak performs a near-instant key check in server memory and immediately steps aside if there is no match.

How the 404 Monitor Works

The Native Setup: WordPress naturally scans every incoming request against your database. If a user hits a broken link or types a bad URL, the core system automatically processes the failure, flags the request, and triggers a native is_404() status code. WordPress does 100% of the heavy lifting to determine that a page is missing before any plugin code even wakes up.

Our Tweak: Bare Bones SEO doesn’t run a background listener to monitor your traffic or scan URLs. Instead, we let the monitor sleep until WordPress has already thrown a definitive 404 error. Only after the native system completes its check do we step in for a split second to log the broken path.

add_action( 'template_redirect', 'bare_bones_monitor_404' );
function bare_bones_monitor_404() {
    if ( is_404() ) {
        bare_bones_log_404_error( $_SERVER['REQUEST_URI'] );
    }
}
  • Why it’s fast: Regular visitors browsing live pages never trigger this script. It uses exactly zero processing power across your functioning site, only logging a clean URL entry when a genuine human or bot error occurs.