Publishing9 of 9

Search engines

Help search engines find your site, prove it's yours in their webmaster tools, and tell them the moment a page changes.

1 min read

On this page

What HotDog does for you

Every build writes:

  • sitemap.xml: every page search engines should know about, with the date each last changed when it has one (a page's updated: or date:, or with lastmod: git in site.yaml, its last commit);
  • robots.txt, pointing to the sitemap;
  • a title, a summary and a canonical address on every page, which the checks keep honest.

Prove the site is yours

Google Search Console and Bing Webmaster Tools ask you to prove you own a site, often with a code to put on your home page. Put the codes in site.yaml:

verify:
  google: the-code-google-gives-you
  bing: the-code-bing-gives-you
  yandex: the-code-yandex-gives-you

The template puts them on the home page as the tags each one looks for. In the editor, Search engines does the same, and shows the sitemap address to give each console.

Tell them what changed: IndexNow

IndexNow lets you tell Bing, Yandex and others which pages changed, so they look again straight away.

  1. Make up a key: 8 to 128 letters, numbers and dashes (openssl rand -hex 16 makes a good one). Put it in site.yaml:

    indexnow: { key: 0123456789abcdef0123456789abcdef }
    

    The build publishes it at /<key>.txt, which is how search engines know the pings are really yours.

  2. Turn it on for your live target in publish.yaml:

    targets:
      live:
        type: rsync
        host: deploy@web.example.org
        path: /var/www/example.org
        indexnow: true
    

    or give the pull agent -indexnow.

After each publish, HotDog sends only the pages that were added, changed or removed since the last time. If nothing changed, it sends nothing. A failed ping is reported, and the site is still published.

If you put the site online some other way

If you deploy with your own script, a container or rsync, run this after the deploy instead of step 2:

hotdog-cms indexnow -site path/to/site

It works out what changed from the build in public/ and remembers what it sent. -dry-run lists the pages and sends nothing; -out names a build somewhere else; if the same site is deployed to more than one place, give each its own -name.

↑↓ moveEnter openEsc close