Fix Open Graph tags not being crawlable - #1
Merged
Merged
Conversation
public/_robots.txt disallowed every user-agent from the entire site in every environment, which stops LinkedIn's crawler (and all other bots) from ever fetching the page to read its Open Graph tags. Removing it lets @nuxtjs/seo manage indexability via site config instead, as the module itself recommends. Also add the `site` config (url/name/description) that @nuxtjs/seo needs to generate absolute og:image and og:url values — without it, prerendered OG tags could be relative/incorrect, which LinkedIn's scraper rejects. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018f2wzgJosMytSkL6AxNUwK
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
public/_robots.txtdisallowed every user-agent from the entire site, in every environment (User-agent: */Disallow: /). This meant no crawler — including LinkedIn's bot — could ever fetch a page to read its Open Graph tags, which is almost certainly why godden.dev couldn't be added as a featured link on LinkedIn. The@nuxtjs/robotsmodule itself warns about this pattern and recommends using site config'sindexabletoggle instead, so the file has been removed and indexability is now managed automatically by the SEO module (verified locally:robots.txtnow servesDisallow:— i.e. allow-all — with the sitemap link intact).siteconfig block (url,name,description,defaultLocale) tonuxt.config.ts.@nuxtjs/seoneeds this to emit absoluteog:image/og:url/canonical URLs. Without it, generated tags could end up relative or wrong, which LinkedIn's scraper rejects. Verified locally: the homepage now rendersog:image,og:url, and<link rel="canonical">all as fully-qualifiedhttps://godden.dev/...URLs.Per-page OG title/description/image handling (
useSeoMeta+defineOgImage) was already correctly implemented on every page, so no changes were needed there.Test plan
npm run typecheck— passes, no errorsnpm run build— succeeds, 14 routes prerenderedcurl /robots.txtnow returns an allow-all policy (previously blocked everything)og:image,og:url, and canonical link on/are absolutehttps://godden.dev/...URLs🤖 Generated with Claude Code
https://claude.ai/code/session_018f2wzgJosMytSkL6AxNUwK
Generated by Claude Code