Skip to the article
Aniq-UI

SaaS TemplateSearch engines and sharing

Search engines and sharing

What the site tells search engines and social networks about each page, and the one setting it all depends on.

What the site does for search engines

  • Every page has its own title and description in each language.
  • Every page names its canonical address and the same page in the other language, so search engines index both languages without treating them as copies.
  • Every page carries Open Graph and X cards, so a shared link shows a title, a description and an image. A blog post shows its own cover and its publication date.
  • /sitemap.xml lists the public pages and every blog post in both languages, and /robots.txt allows everything and points to the sitemap.
  • The sign-in, sign-up and forgot-password pages and the error pages ask search engines not to index them, so they stay out of search results.
  • The page's lang follows the language, and Arabic pages carry dir="rtl".

The one setting it depends on

The canonical links, the language links, the sitemap, robots.txt and the sharing cards are all built from NEXT_PUBLIC_SITE_URL. Set it to your domain before you build for production, or they point at http://localhost:3030.

After going live, open /sitemap.xml on your domain and check that every address starts with it.

How each page's metadata is built

Included with your purchase. Sign in to read, or open it in your download.

The helper that builds every page's metadata, and the message keys each page reads.

The sitemap and robots.txt

Included with your purchase. Sign in to read, or open it in your download.

Which pages the sitemap lists, how to add one, and how a page is kept out of search results.

Stuck on a step?

Find a fix before you start over.

Troubleshooting

Cookie Preferences

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies for analytics and personalized advertising.