Urgent.News

What's breaking now, across thousands of outlets.

Tech

SEO Basics in TanStack Start: Meta Tags, robots.txt and a Dynamic Sitemap

Prefer to watch? Here is the video version of this tutorial: What is SEO? SEO stands for Search Engine Optimization. It is the practice of improving a website so it ranks higher in unpaid ("organic") search results on engines like Google. When people search for a product, service or answer online, SEO helps search engines understand what your website is about and recommend it to the right…

To improve search engine optimization (SEO) on a website, start by adding basic elements like page titles, descriptions, a robots.txt file, and a sitemap. In a TanStack Start demo store, open the About page and add a head section to the route. The head section contains meta tags, such as the page title and description, which are displayed in the browser tab, bookmarks, and Google search results.

Create a file named seo.ts at src/lib/seo.ts and include a reusable function called seo. This function takes in parameters for the page title, description, image, and path, and generates the necessary meta tags and Open Graph tags. The seo function formats titles consistently, handles standard tags, prepares social previews, and only adds what is provided, ensuring clean and error-free meta tags.

To use the seo function, import it from the seo.ts file and apply it to the About page's head section. The seo function will generate the appropriate meta tags based on the provided parameters, such as the page title, description, and path. Additionally, create a robots.txt file at the root of your domain, which instructs search engine bots on which pages or sections to crawl and which to skip. This helps keep bots out of private or irrelevant pages and optimizes crawl budget.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How to use Synthetic Credit Data API: synthetic credit data for safer ML

Introduction – Why Synthetic Credit Data Matters Fintech applications, credit‑scoring models, and risk‑management pipelines need realistic transaction and borrower data to train, test, and validate…

  • CredSynth API generates realistic credit profile data without breaching privacy regulations
  • Python script fetches synthetic credit data via RESTful interface with JSON response
  • API endpoint allows customization of record count, seed, region bias, and risk profile

Handling Gemini API Key Rotation and Rate Limits Across Cron Jobs in Next.js

The Problem When running scheduled influencer data processing cron jobs in Next.js on Vercel, hitting a Gemini API rate limit will abruptly kill your background run. Standard single-key environment variables fail instantly once you scale up creator analysis requests, returning a 429 Too Many Requests status and leaving your database…

  • Gemini API key rotation needed for Next.js cron jobs
  • Round-robin key manager class developed to handle key rotation
  • GeminiKeyRotator class mitigates 429 errors and maintains cron functionality

More from Tuesday 17 November →