TECHNICAL TUTORIAL

SEO Setup Guide: Robots, Sitemap, Meta Tags & Google Search Console.

A practical, step-by-step guide to robots.txt, sitemap.xml, meta tags, canonical URLs, JSON-LD and Google Search Console verification.

SEO

SEO Setup Guide: From Zero to Google Search Console

Learn how to configure the essential technical SEO files and metadata for a website. Replace https://www.example.com and all placeholder text with your own public information.

1. Create robots.txt

Create a plain-text file named robots.txt in the website root, accessible at https://www.example.com/robots.txt.

User-agent: *
Allow: /

Sitemap: https://www.example.com/sitemap.xml

robots.txt provides crawling instructions, but it does not guarantee indexing and is not a security mechanism. Do not use it to protect private pages.

2. Create sitemap.xml

Create sitemap.xml in the website root and list the canonical, publicly accessible pages you want search engines to discover.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/</loc>
  </url>
  <url>
    <loc>https://www.example.com/about</loc>
  </url>
  <url>
    <loc>https://www.example.com/contact</loc>
  </url>
</urlset>

Replace these example URLs with your real page URLs. Include only URLs that return a successful response and are intended for indexing. A sitemap helps discovery but does not guarantee indexing. Optional lastmod values should reflect genuine page changes; avoid invented dates.

3. Add SEO tags inside the HTML head

Put the following tags in the <head> of the homepage. Use a unique title, description and canonical URL on each indexable page. Do not duplicate existing tags.

<title>Example Business | Main Service and Location</title>
<meta name="description" content="Discover the services, expertise and useful information offered by Example Business. Explore our website to learn more." />
<meta name="keywords" content="example business, main service, related topic" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index, follow" />
<link rel="canonical" href="https://www.example.com/" />

<meta property="og:type" content="website" />
<meta property="og:site_name" content="Example Business" />
<meta property="og:title" content="Example Business | Main Service and Location" />
<meta property="og:description" content="Explore Example Business services and useful information." />
<meta property="og:url" content="https://www.example.com/" />
<!-- Optional: use a real publicly accessible image -->
<!-- <meta property="og:image" content="https://www.example.com/images/social-preview.jpg" /> -->

The keywords tag is optional: Google Search does not use it for ranking. The robots tag is also optional for a normally indexable page. Open Graph tags improve link previews on social platforms; they are not a ranking shortcut. Do not use the homepage canonical on every page.

4. Add JSON-LD structured data

Put this script in the homepage <head> or near the end of <body>. The description should accurately describe the real website.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Example Business",
  "url": "https://www.example.com/",
  "inLanguage": "en",
  "description": "Official website of Example Business, offering information about its services, expertise and resources."
}
</script>

Replace the name, URL, language and description. Structured data helps search engines understand content; it does not guarantee rich results or higher rankings. Do not add fake ratings, services or business details.

5. Verify ownership in Google Search Console

  1. Open Google Search Console and sign in.
  2. Select Add property.
  3. Choose Domain to cover all subdomains and HTTP/HTTPS versions; Google requires DNS verification for this property type. Enter example.com (without https://).
  4. At your DNS provider, add the exact TXT record supplied by Google. Wait for DNS propagation, then click Verify. Keep the record afterward.
  5. Alternatively choose URL prefix, enter https://www.example.com/, and verify using Google's HTML tag or HTML file method. Copy the exact verification token supplied for your property; never use a sample token.

For the HTML tag method, add Google's provided <meta name="google-site-verification" content="YOUR_UNIQUE_TOKEN" /> inside the homepage <head>, deploy, and click Verify. Keep the tag to maintain verification. Domain properties cannot use the HTML-tag verification method.

6. Submit the sitemap and inspect URLs

  1. In Search Console, open your verified property.
  2. Open Sitemaps, enter sitemap.xml (or the full sitemap URL as appropriate), and click Submit.
  3. Use URL Inspection to check an important public URL. If needed, request indexing.
  4. Review the indexing and performance reports over time. Crawling and indexing are not instant or guaranteed.

7. Final checklist

  • https://www.example.com/robots.txt loads successfully.
  • https://www.example.com/sitemap.xml is valid XML and contains real canonical URLs.
  • Each page has its own descriptive title, meta description and canonical URL.
  • The homepage JSON-LD uses accurate public information.
  • Search Console ownership is verified.
  • The sitemap is submitted and important URLs are inspected.

Official documentation: Google Search Console ownership verification, Add a property, Sitemaps documentation.

Your privacy matters

We use essential cookies to keep this website working. Optional cookies are only used with your consent. Privacy Policy