Error Handling Patterns for Webhook Endpoints
A webhook endpoint receives an HTTP request from another service when an event occurs, such as a payment update or a repository…
When an API serves paginated data, its clients need reliable links to move through the results. If those results also appear on public web pages, search engines need crawlable page URLs and clear canonical signals. A canonical URL is the preferred address for a page when similar or duplicate URLs exist.
Use HTTP Link headers to help API clients navigate. For search visibility, give each meaningful HTML page its own stable URL, link pages with ordinary HTML links, and set a canonical URL on each page. These steps improve navigation and clarify which URLs represent distinct pages, but they do not guarantee higher rankings.
An API response gives data to software. A search-facing HTML page shows content to people and search engines. An API can include pagination details without providing a web page that search engines can crawl for each result set. So API navigation alone does not show that Google can find those pages.
Google generally discovers links in HTML <a href> elements. It does not generally trigger buttons or JavaScript actions that require user interaction, and discovery does not guarantee that Google will crawl or index a page. If search traffic matters, publish useful paginated content at distinct URLs and link those pages directly in the HTML.
An HTTP Link header connects a response to related resources, such as the next page of results. The Web Linking standard, RFC 8288, defines the header format. The IANA link relation registry lists relation names such as next and prev.
An API can use the header to tell clients where to continue or go back:
Link: ; rel="next",
; rel="prev"
Use the URLs generated for that response. With cursor-based pagination, include the cursor and any required filters or sort parameters in each destination URL. Clients can then follow the server’s pagination state instead of guessing how to build the next request. If there is no next or previous page, leave out that relation.
These links serve API clients. Google’s current pagination guidance says it no longer uses rel="next" and rel="prev" tags to identify paginated sequences. That statement concerns those tags; it does not establish whether Google uses API Link response headers to discover or rank equivalent HTML pages. Implement the headers for the API contract, and use HTML links for search-facing navigation.
Give each meaningful page in a sequence its own URL, then connect adjacent pages with ordinary links. For example, an HTML page at https://www.example.com/articles?page=2 can link back to page one and forward to page three:
<a href="https://www.example.com/articles?page=1">Previous</a>
<a href="https://www.example.com/articles?page=3">Next</a>
Keep the destination URLs accessible and stable. Do not rely on a URL fragment such as #page=2 to identify a separate page; Google ignores fragments for pagination purposes. A button that loads more content can still support readers, but provide crawlable links to the corresponding page URLs as well.
A canonical tag tells search engines which URL you prefer when pages are duplicate or very similar. For a genuinely distinct page in a sequence, point the canonical to that page’s own URL:
Page two should generally identify page two as canonical, rather than pointing to page one. A canonical tag tells search engines which URL you prefer, but Google may select a different canonical based on the signals it sees. Make the canonical URL match the URLs in your internal links and sitemaps. Google’s documentation on canonical URLs explains how it evaluates those signals.
A canonical tag does not decide whether a page deserves indexing. Make that decision based on whether the page provides useful, distinct content. Google does not require unique titles and descriptions for every page in a pagination sequence to recognize the sequence, though clear page-specific titles can help people understand what they are opening.
A server can send a canonical relationship in an HTTP Link header:
Link: ; rel="canonical"
Google documents this method for eligible non-HTML documents, such as PDFs, where an HTML <link> element is unavailable. For an HTML page, use the HTML canonical tag, or choose the header method deliberately and keep it consistent. Avoid sending conflicting canonical signals through the page, response headers, redirects, or sitemap entries.
The documented support for canonical headers does not establish how Google handles arbitrary JSON API responses. Do not assume that adding rel="canonical" to a JSON response makes the corresponding HTML page eligible for search or transfers ranking signals to it. If an API response duplicates or represents an HTML document, verify how the chosen setup is handled rather than promising an SEO effect.
Filters and sort options can create many URLs with similar content. Decide which combinations offer distinct value to searchers, and avoid making endless low-value variations available for indexing. Use a canonical when URLs show duplicate or very similar content. Use noindex when you want to exclude an accessible page from search results. Google advises against using noindex to choose a canonical. A crawler must be able to access a page to read its noindex directive.
If a duplicate URL has been retired, redirect it to the preferred URL instead of leaving both pages live and relying only on a canonical tag. Canonicalization is a preference signal, while a redirect gives a stronger indication that the old URL has moved.
Check an API response to confirm that each Link destination is valid, preserves the required query state, and points to the intended next or previous result. Also test the first and last pages, where one direction has no destination.
For search-facing pages, check that each page returns the expected content and a successful response. Confirm that its canonical points to the intended URL and that links to the previous and next pages use real <a href> elements. Use Google Search Console’s URL Inspection to compare the canonical you declared with the one Google selected. This shows how Google interpreted the signals, but does not guarantee indexing or rankings.
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com