Tag: technical seo

  • Headless WordPress Blog Not Updating in Next.js? Webhook & Cache Fixes for 2026

    Headless WordPress Blog Not Updating in Next.js? Webhook & Cache Fixes for 2026

    Quick answer: When a headless WordPress post is published but does not appear on a Next.js or React website, check the publishing chain in order: WordPress status, public REST API response, frontend slug route, build or cache strategy, webhook delivery, blog listing, and sitemap. A successful WordPress publish is not proof that the public frontend refreshed. Fix the failed step, then test the actual public URL as a logged-out visitor.

    This 2026 guide is for businesses using WordPress as a content management system and Next.js or React as the public website. It focuses on headless WordPress blog updates, not general Google indexing. If your article is already visible publicly but absent from search, use our separate React, Next.js and WordPress indexing checklist.

    Why does WordPress say Published while the Next.js blog is still outdated?

    Headless publishing has at least two independent systems. WordPress stores and exposes content. The frontend decides when to request it and what HTML visitors receive. Between them may sit a deployment service, an application cache, a CDN, an API gateway and a scheduled build. Publishing changes the CMS record; it does not necessarily clear every cache or rebuild every page.

    For example, a Delhi NCR agency publishes a new service guide at 10 AM. WordPress displays the post and its image, but the public blog still lists yesterday’s articles. That could mean the frontend uses a static build created before 10 AM, a cached post list, a missing webhook, a route that cannot resolve the new slug, or an outdated CDN response. Each cause requires a different fix.

    Start with a seven-step diagnostic flow

    1. Confirm publication: Check the WordPress post status is publish, not draft, future or private.
    2. Check the content API: Request the published post by slug from the public WordPress REST endpoint. Verify it returns the correct title, content, featured media and updated date.
    3. Check the React route: Open the expected /blog/your-slug/ address directly in a private browser window.
    4. Identify the rendering strategy: Is the site fully static, built on deploy, server-rendered, or using Next.js caching and revalidation?
    5. Trace the webhook: Inspect whether the publish or update event reached the frontend and received a successful authenticated response.
    6. Inspect listing and sitemap: A working detail page may still be missing from the archive and XML sitemap if those use separate data sources or caches.
    7. Validate SEO output: Confirm the public URL, canonical, metadata, indexability and featured image. Do not equate a working WordPress URL with a working public URL.

    Record the time, post ID, slug and expected frontend address at each step. This evidence prevents teams from repeatedly publishing the same article to solve an unrelated cache issue.

    1. Confirm the WordPress REST API contains the new article

    WordPress’s REST API commonly exposes public posts under /wp-json/wp/v2/posts. Query the exact slug and inspect the response. Published posts should be visible without admin authentication unless the site intentionally restricts the API. A successful response from the CMS narrows the fault to the integration or frontend.

    GET https://your-cms.example/wp-json/wp/v2/posts?slug=your-post-slug&_embed

    Check the returned status, slug, date, modified, content.rendered and featured media details. If the response is empty, look for incorrect slugs, status filters, API security rules, multilingual variants, or an outdated proxy. Never expose private drafts or API credentials merely to make the public listing work.

    When the API contains the article but the frontend does not, stop editing the WordPress post. The next investigation belongs in the frontend fetch, cache or deployment layer. Our WordPress development services cover CMS integrations as well as traditional WordPress builds.

    2. Identify whether your frontend is static, server-rendered or cached

    Frontend approach Why a new article may be missing What to test
    Static export or build-time generation Pages are generated only when a new deployment runs Build trigger, deployment logs, generated routes
    Next.js App Router with cached data Cached post lists or detail pages still serve old results Cache tags, path revalidation, runtime version
    Server-rendered or uncached fetch API, network, proxy or CDN returns stale data Origin response, CDN headers, API fetch errors
    Client-only React fetching Browser-side requests fail or cached JSON is stale Network panel, rendering, route status and SEO HTML

    These are not interchangeable. A site exported as static files cannot suddenly support server-side revalidation without an appropriate runtime. If a hosting workflow requires a new build for every post, automate that deployment and confirm completion rather than calling a Next.js cache API that is not available in production.

    3. Use the correct Next.js revalidation model in 2026

    Next.js documentation updated on 3 March 2026 distinguishes applications using cacheComponents: true from the previous caching model. With Cache Components, cached functions can use use cache, cacheLife and cacheTag. A CMS webhook can invalidate the appropriate tag with revalidateTag('posts', 'max'), or target a route with revalidatePath. The exact implementation depends on the installed Next.js version and caching configuration.

    Important: In a Route Handler, revalidateTag with the max profile uses stale-while-revalidate behavior. The next request may briefly receive stale content while fresh data is generated. updateTag is intended for Server Actions, not external webhook Route Handlers. Do not copy outdated code that assumes every fetch is automatically cached.

    Read the official Next.js revalidation guide and, if you do not use Cache Components, its previous-model caching guide. Match the documentation to your application before deploying changes.

    4. Build a secure WordPress-to-Next.js webhook

    A typical event flow is: WordPress publishes or edits a post, a trusted server sends an authenticated POST request, a Next.js Route Handler validates it, and the application revalidates the affected blog data or route. The webhook must also handle unpublishing and trashing so deleted posts do not remain publicly visible.

    For an App Router project, the following is an illustrative server-side pattern. Adapt authentication, error handling, deployment environment and caching to your actual codebase:

    import { revalidatePath, revalidateTag } from 'next/cache';
    import { NextResponse } from 'next/server';
    
    export async function POST(request: Request) {
      const secret = request.headers.get('x-revalidate-secret');
      if (!secret || secret !== process.env.REVALIDATE_SECRET) {
        return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
      }
    
      const body = await request.json();
      const slug = typeof body.slug === 'string' ? body.slug : '';
      if (!/^[a-z0-9-]{1,160}$/.test(slug)) {
        return NextResponse.json({ error: 'Invalid slug' }, { status: 400 });
      }
    
      revalidateTag('wp-posts', 'max');
      revalidatePath('/blog');
      revalidatePath('/blog/' + slug);
      return NextResponse.json({ accepted: true, slug });
    }

    The tag name must match the cache tag actually used by your data-loading code. For some setups, revalidating the archive and the specific article path is sufficient; for others, a shared cached query also needs invalidation. Protect the endpoint with a strong secret stored in server-side environment variables, use HTTPS, and consider signed payloads, request-size limits, rate limiting and replay protection for production use.

    Do not treat a 200 webhook response as proof that the public page already contains the new article. It confirms the handler accepted the request, not necessarily that a rebuild completed, a stale-while-revalidate cycle finished, or a CDN cache refreshed.

    5. Handle publish, edit, unpublish and trash events differently

    A robust blog automation does more than create new URLs. Publishing should update the article and listing. Editing should refresh the detail page, related-article cards and any modified date shown publicly. Unpublishing or trashing should remove the post from the archive and sitemap and make its former route return the intended response, often 404 or a carefully justified redirect.

    • Publish: Revalidate the post detail, blog archive, category pages and sitemap source where needed.
    • Edit: Refresh title, body, excerpt, metadata, featured image and modified date.
    • Slug change: Update the new route and plan a redirect from the old address where appropriate.
    • Trash or unpublish: Remove the post from public lists and ensure the old page is not incorrectly cached as live.
    • Restore: Repopulate the route and internal links after the CMS again reports a published status.

    Use idempotent event processing so a retry does not create a second article or trigger conflicting deployments. Include a unique event identifier and post ID in operational logs, but never place webhook secrets in browser-visible JavaScript.

    6. Why does the article page work but the blog listing stay stale?

    Blog archives often fetch a paginated list while article pages fetch by slug. These queries may have different cache keys, revalidation tags or deployment paths. It is possible to refresh the detail page and forget the archive. Also check sort order, publication date timezone, category filters and pagination. A newly published post may appear on page two if the frontend sorts by a stale date field.

    Verify the actual public blog listing after publication. Check both the first page and any relevant category filter. If the article appears only after a hard refresh, inspect browser and CDN caching; if it never appears, inspect the server data query and its invalidation policy.

    7. Refresh the public sitemap and canonical URLs

    Google discovers the public frontend URL, not merely the WordPress editor address. If your canonical articles live under https://yourdomain.example/blog/, the XML sitemap should list those canonical frontend addresses. A backend sitemap containing CMS URLs is not a substitute for the public sitemap. Generate or revalidate the sitemap from the same published-content source used by the frontend.

    After publishing, check the article URL, canonical tag, robots meta tag, sitemap entry, internal links and server-rendered HTML. A sitemap helps discovery but does not guarantee indexing. For detailed crawling and canonical diagnosis, follow our website indexing troubleshooting guide.

    8. Do not confuse cache revalidation with Google indexing

    Three distinct checks are required. CMS published means WordPress stored the post as public. Frontend live means a visitor can open the correct React or Next.js page with real content. Google indexed means Search Console reports that Google has indexed the public URL. These events can occur at different times, and none automatically proves the next.

    Once the frontend is live, inspect the exact URL in Google Search Console and monitor sitemap processing. Do not promise immediate indexing or assume that repeatedly requesting indexing fixes a broken frontend route. If a page returns 404, empty content, noindex, or the wrong canonical, fix that first.

    9. Test featured images and SEO metadata after a publish

    Headless frontends sometimes render the title but omit the featured image or excerpt because those fields are fetched separately. Confirm the CMS media URL resolves, image dimensions are appropriate, alt text is meaningful and the React component displays it. Also verify the page’s HTML title, meta description, Open Graph image, canonical and article dates.

    Large images can create loading problems even when the publishing pipeline works. Our Core Web Vitals INP guide explains interaction responsiveness, while the separate LCP guidance covers main-image loading. Do not solve a stale-content bug by disabling all caching and accidentally making every page slow.

    10. Monitor every publication with a real end-to-end test

    Build a small verification record for each new article: CMS post ID, expected public slug, publish timestamp, webhook response, deployment or revalidation outcome, public HTTP status, article title in rendered HTML, featured image status, archive visibility and sitemap presence. Retest after edits and removals. This creates evidence for a failure instead of a vague “connected successfully” message.

    Check Pass condition If it fails
    WordPress post Status is publish Review author permissions and scheduling
    WordPress API Slug returns published content Check API filters and access
    Webhook Authenticated request accepted Inspect URL, secret and server logs
    Frontend route HTTP 200 with correct article text Inspect build, routing and cache
    Archive Post visible in expected order Revalidate listing and pagination
    Featured image New media displayed with alt text Inspect media fetch and image settings
    Sitemap Canonical public URL included Refresh sitemap source or generation
    Search Console Actual indexing verdict recorded Separate crawl issues from publication issues

    A practical 2026 rollout plan for Delhi NCR business websites

    Day 1: Map the WordPress API, frontend hosting, deployment mode and public URL pattern. Day 2: Test a controlled publish and capture API, webhook and frontend responses. Day 3: Implement version-appropriate cache invalidation or build automation. Day 4: Add edit, trash and slug-change handling. Day 5: Verify public article HTML, archive, metadata, featured image and sitemap. Day 6: Add retries, alerts and idempotency for failed events. Day 7: Run end-to-end tests and document rollback procedures.

    This is an example work plan, not a guaranteed one-week fix. A custom deployment pipeline or legacy React build may require more investigation. For WordPress and React integrations across Delhi, Noida, Gurugram and Ghaziabad, our website maintenance team can scope the full publishing chain instead of treating CMS publication as the final step.

    Frequently asked questions

    Why is my WordPress post published but not showing on my React website?

    Because the React frontend is separate from WordPress. Check the public REST API, slug routing, build or cache configuration, and any webhook used to refresh the site.

    Do I need to rebuild Next.js every time I publish a blog?

    Not always. Fully static exports commonly need a new build. Next.js applications with an appropriate runtime can use version-compatible caching and on-demand revalidation. Check your actual deployment model.

    What is a WordPress-to-Next.js revalidation webhook?

    It is a server-to-server notification that tells the frontend content changed so affected cached data or routes can be refreshed. It must be authenticated and tested.

    Can revalidatePath make a page update instantly?

    It marks the specified route for revalidation under the framework’s documented behavior. A Route Handler response alone does not guarantee a visitor already sees new HTML, especially with additional caches or build steps.

    Why does the new article open directly but not appear in the blog archive?

    The detail route and archive often use separate queries and caches. Revalidate the post list, inspect sorting and pagination, and confirm the category filter includes the new post.

    Should a WordPress draft trigger public indexing or a frontend article?

    No. Drafts should remain private. Publish only approved content, and make sure unpublish and trash events remove content from public routes and sitemaps.

    Does updating a sitemap mean Google has indexed the post?

    No. Sitemap inclusion helps discovery. Search Console URL Inspection is needed to check Google’s actual indexing status for the canonical public URL.

    What should I check if the featured image does not update?

    Confirm the CMS featured media ID and URL, the frontend image fetch and cache, the image component’s remote-domain configuration, and any CDN caching. Test the public image rather than assuming an upload is displayed.

    Final takeaway

    A reliable headless blog is a connected system, not just a WordPress Publish button. Verify CMS status, API content, authenticated webhook, cache or build refresh, public React route, archive, image, canonical and sitemap before calling the job complete. If your business relies on frequent content updates, Keshav Enterprises’ WordPress and web development team can help review the integration and define measurable publication checks.

  • Why Your Website Is Not Indexed on Google in 2026: 15 Fixes for React, Next.js & WordPress

    Why Your Website Is Not Indexed on Google in 2026: 15 Fixes for React, Next.js & WordPress

    If your website is not indexed on Google, the first task is diagnosis—not repeatedly clicking “request indexing.” A page can fail to appear because the public URL does not exist, the server returns the wrong status, Google is blocked, the canonical points elsewhere, the page is missing from the sitemap, JavaScript fails to render, or the content adds too little unique value.

    This 2026 guide explains how to diagnose indexing problems on React, Next.js and WordPress websites, with special attention to headless setups where WordPress manages content but a separate frontend serves the public page.

    Quick answer: why is my website not indexed on Google?

    The most common causes are: Google has not discovered the URL yet, the page cannot be crawled, the page contains noindex, the canonical points to another URL, the public route is broken, JavaScript prevents important content from rendering, the page is weak or duplicated, or Google has crawled the page but chosen not to index it.

    Start by checking the exact public URL in Google Search Console URL Inspection. Then verify the live HTTP status, rendered HTML, canonical, robots directives, sitemap inclusion and internal links.

    Understand the difference between discovery, crawling and indexing

    Stage What it means What to check
    Discovered Google knows the URL exists Sitemap, internal links, feeds and references
    Crawled Google fetched the page Status code, robots rules, rendered content
    Indexed Google stored the page as eligible for search Canonical, content value, duplication and quality
    Ranking The indexed page appears for relevant queries Search intent, relevance, authority, UX and competition

    These stages are different. A page may be crawled but not indexed, or indexed but receive no meaningful impressions.

    1. Confirm that the public URL actually exists

    For a normal published article, the public URL should usually return HTTP 200. A 404, 500, redirect loop, timeout or soft-404 style response can prevent normal indexing.

    On a headless WordPress setup, publishing a post in the CMS does not automatically prove that the frontend route exists. Your React or Next.js application still needs to fetch the post, resolve its slug and serve a working public URL.

    2. Check whether the page has a noindex directive

    Look for:

    • <meta name="robots" content="noindex">
    • <meta name="googlebot" content="noindex">
    • An X-Robots-Tag: noindex HTTP header
    • SEO plugin settings that mark the page as non-indexable
    • Environment-specific rules accidentally carried from staging

    Google’s noindex documentation explains that Google must be able to crawl a page to see its page-level noindex directive.

    3. Make sure robots.txt is not blocking essential crawling

    A robots.txt file controls crawling, not indexing in the same way as noindex. Check the public domain’s robots file for broad rules such as:

    User-agent: *
    Disallow: /blog/
    

    Also consider CDN, firewall or security rules that may block Googlebot even when robots.txt appears correct.

    4. Verify the canonical URL

    A canonical tells Google which URL you prefer when similar versions exist. On headless websites, one of the most damaging mistakes is to point the public page to the backend WordPress URL.

    For a public blog article, the canonical should normally match the intended frontend URL. Google may still choose a different canonical if signals conflict, so keep these consistent:

    • Canonical tag
    • Internal links
    • Sitemap URL
    • Redirects
    • HTTP/HTTPS version
    • www/non-www version

    Google’s canonical troubleshooting guidance is useful when the selected canonical differs from your preference.

    5. Check whether the page appears in your XML sitemap

    A sitemap helps Google discover canonical URLs you want considered for search. It does not guarantee indexing, but missing pages can slow discovery on websites where internal linking is weak.

    For React or Next.js sites, confirm that the frontend sitemap updates after WordPress publishes a new post. A backend WordPress sitemap is not enough if the canonical public URLs live on another host.

    Google recommends using fully qualified canonical URLs in sitemaps. See the official sitemap documentation.

    6. Make sure important content is available after rendering

    Google can render JavaScript, but JavaScript-heavy applications add extra failure points. Google’s own documentation describes crawling, rendering and indexing as separate stages for JavaScript pages.

    • The initial HTML contains only an empty app shell.
    • The content API fails during rendering.
    • Authentication blocks the API.
    • Important text appears only after user interaction.
    • JavaScript errors prevent the article from loading.
    • Client-side routing serves the wrong status code.

    Google recommends server-side rendering or pre-rendering as a strong option because it makes content easier to access for users and crawlers. Review the JavaScript SEO basics.

    7. Check whether the Next.js or React route supports new WordPress slugs

    A headless publishing system usually needs a route such as /blog/[slug]/. Confirm that:

    • Published posts are returned by the API.
    • The slug query matches WordPress exactly.
    • Draft filters do not accidentally hide published content.
    • Static builds are revalidated after publication.
    • CDN caches are refreshed when required.
    • The route returns the correct status if the post does not exist.

    If your site requires a full redeploy every time a WordPress post is published, that dependency should be documented and automated safely.

    8. Verify title, description and canonical in the public HTML

    SEO metadata stored inside WordPress does not automatically appear on a separate frontend. Your React or Next.js application must retrieve and render the intended metadata.

    • Unique title
    • Meta description
    • Canonical URL
    • Robots directives
    • Open Graph title and image
    • Article structured data where appropriate

    If the frontend ignores WordPress SEO fields, fixing metadata in the CMS alone will not solve the public page.

    9. Improve internal discoverability

    Every important article should be reachable through crawlable internal links. Add it to the main blog listing, a relevant category page, related articles, and relevant service pages where editorially appropriate.

    A technical SEO guide can naturally support the SEO services page, while a website rendering problem may relate to website development support.

    10. Look for duplicate or near-duplicate pages

    If multiple pages answer the same question with slightly different wording, Google may choose one representative URL or decide that some pages add little new value.

    • Does this page serve a distinct search intent?
    • Does it contain unique examples or guidance?
    • Is there already another page answering the same question?
    • Would updating the existing page be better than creating a new URL?

    11. Improve thin or generic content

    There is no minimum word count that guarantees indexing. A long article can still be weak if it repeats generic information.

    • A direct answer near the top.
    • Specific diagnostic steps.
    • Clear examples.
    • Original checklists.
    • Primary-source references.
    • Relevant internal links.
    • Useful FAQs.

    12. Check server reliability and crawl access

    If Googlebot repeatedly encounters timeouts, 5xx responses or blocked resources, indexing can suffer. Monitor server logs, CDN errors, API uptime, firewall rules, DNS issues and rate limiting.

    13. Understand “Discovered – currently not indexed”

    This generally means Google knows the URL but has not indexed it yet. Check whether the page is new, internal linking is weak, the site publishes large volumes of low-value URLs, or the page has limited unique value.

    14. Understand “Crawled – currently not indexed”

    This means Google has fetched the page but has not added it to the index at that time. Focus on content uniqueness, canonical consistency, duplication, usefulness, site quality and internal linking.

    15. Do not confuse indexing with ranking

    A page can be indexed and still receive no clicks. Once Search Console confirms indexing, shift the diagnosis toward search intent, keyword relevance, title and snippet quality, topical authority, competition, internal links and conversion experience.

    Headless WordPress + React/Next.js indexing checklist

    Check Expected result
    WordPress status Post is published
    API response Published post is available without authentication
    Frontend route Public URL returns HTTP 200
    Rendered content Main article text is available reliably
    Canonical Points to the public frontend URL
    Robots No unintended crawl or index block
    Sitemap Public canonical URL is included
    Internal links Article is linked from blog and related pages
    Search Console Exact public URL is inspected and monitored

    A practical 7-day indexing diagnosis workflow

    Day 1: technical validation

    Check HTTP status, canonical, robots directives, rendered content and page source.

    Day 2: discovery

    Verify sitemap inclusion and internal links from the blog archive or relevant pages.

    Day 3: Search Console inspection

    Record the exact indexing verdict. Distinguish unknown, discovered, crawled and indexed states.

    Days 4–5: fix the actual cause

    Resolve canonical conflicts, rendering failures, noindex rules, broken routes, duplicate content or weak internal links.

    Days 6–7: monitor changes

    Recheck the live page and Search Console. If the page is technically healthy, focus on usefulness and discovery rather than repeated submission attempts.

    This is a diagnostic workflow, not a promise that Google will index a page within seven days.

    Frequently asked questions

    Why is my WordPress blog published but not showing on Google?

    Publishing in WordPress makes the post available in the CMS. Google still needs a crawlable public URL. On headless sites, the React or Next.js frontend must also create and serve the route correctly.

    Does submitting a sitemap guarantee indexing?

    No. A sitemap helps Google discover preferred URLs, but it does not guarantee crawling, indexing or ranking.

    Does Request Indexing guarantee Google will index the page?

    No. URL Inspection can help Google recrawl a page, but indexing decisions remain automated and are not guaranteed.

    Can JavaScript prevent Google from seeing my content?

    Yes. Google can render JavaScript, but failed API calls, blocked resources, client-side errors or delayed rendering can stop important content from being available reliably.

    Should a React website use server-side rendering for SEO?

    Server-side rendering or pre-rendering can reduce dependence on client-side rendering and make important content easier for crawlers and users to access.

    Can a wrong canonical prevent the correct page from appearing?

    Yes. Conflicting canonical signals can cause Google to prefer a different URL.

    What does “URL is unknown to Google” mean?

    It means Search Console does not currently have indexing information for that URL. Verify the route, sitemap and internal discovery, then monitor the URL.

    What should I do if Google crawled the page but did not index it?

    Review content uniqueness, canonicalization, duplication, usefulness and the site’s overall quality.

    Can schema force Google to index a page?

    No. Structured data can help describe eligible content but cannot override indexing problems or Google’s decision not to include a URL.

    When should I get technical SEO help?

    If the problem involves rendering, headless CMS integration, inconsistent canonical signals, server errors or persistent indexing issues across many pages, a combined developer and technical SEO review is usually more efficient.

    Final takeaway

    If your website is not indexed on Google, diagnose the complete publishing chain. For headless websites, that means WordPress, the content API, the React or Next.js route, rendered HTML, canonical URL, sitemap, internal links and Search Console all need to agree on the same public page.

    Keshav Enterprises works across technical SEO, React/Next.js development, WordPress and local search. If you want an indexing or website audit, send your website and affected URLs for review.