Skip to Content
Project configuration

Get your site on Google (Search Console)

The address your project gets, in the project-name.clients.zenifra.com format, can already show up on Google. Zenifra does not block search engines: your application decides what Google reads, through robots.txt, meta tags and the content of your pages.

Google Search Console is Google's free tool to confirm the site is yours, submit the list of pages (sitemap), request indexing and follow the clicks that come from search. This guide covers the full path for the Zenifra address and for your own domain.

Summary

StepWhat to doWhere
1Check that Google can open the siteBrowser and Zenifra console
2Create a URL prefix propertySearch Console
3Verify with the HTML tag or the HTML fileApplication code
4Publish robots.txt and sitemap.xml and submit the sitemapApplication code and Search Console
5Request indexing of the main pagesURL Inspection tool

1. Before you start

Google needs to open the home page like a regular visitor. Check that:

  • The project is a public HTTP project and is running. Private projects have no public address, and a stopped project does not serve its pages.
  • The home page opens without login. Test it in a private browser window. If the application sends visitors straight to /login, Google only sees the login screen.
  • App protection does not block Google:
    • Google gets through the country filter and the anti-bot challenge, including under attack mode: Zenifra checks that the request really comes from Google. See Google and Bing.
    • No short custom term that catches Googlebot, such as bot or google.
    • Only trusted IPs can access is off, because that option closes the site to everyone outside the list.
  • The application does not ask to stay out of search. Look for noindex in the page source (Ctrl + F) and check that your application server does not send the X-Robots-Tag: noindex header.

Quick test from the terminal:

# Must answer 200 with the home page HTML, without redirecting to login
curl -s -o /dev/null -w '%{http_code}\n' \
  -A 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' \
  https://project-name.clients.zenifra.com/

# Must not show noindex
curl -sI https://project-name.clients.zenifra.com/ | grep -i x-robots-tag

2. Create the property in Search Console

Search Console has two property types:

TypeWhat it coversHow it verifiesUse it for
URL prefixOnly addresses that start with the given prefix, including the protocolHTML tag, HTML file, Google Analytics or Google Tag ManagerThe .clients.zenifra.com address
DomainThe whole domain, with every subdomain and protocolTXT record in the domain's DNSYour own domain

The Domain type requires a DNS record, and the DNS of clients.zenifra.com belongs to Zenifra. For the platform address, use URL prefix:

  1. Open Google Search Console with your Google account.
  2. In the property selector, at the top left, click + Add property.
  3. Choose URL prefix and enter the full address, with https:// and the trailing slash:
https://project-name.clients.zenifra.com/
  1. Continue. Search Console opens the ownership verification page with the available methods.

3. Verify the property

Pick one of the methods below. Both need a change in your application code and a new deploy, either a push to the repository or New build in the project's Deploys tab.

Do not remove the tag or the file

Keep the tag or the file online after verification. Google checks it from time to time and, if it is gone, the property loses its verification.

Option A: HTML tag

  1. On the verification page, choose HTML tag and copy the tag. It looks like this:
<meta name="google-site-verification" content="YOUR_CODE" />
  1. Put the tag inside the <head> of the home page:

Static HTML, Vite, React, Vue or Angular (SPA): in the index.html at the project root. Do not add the tag with JavaScript after the page loads, as with react-helmet: Google looks for the tag in the HTML delivered by the server.

<head>
  <meta charset="UTF-8" />
  <meta name="google-site-verification" content="YOUR_CODE" />
  <title>My application</title>
</head>

Next.js (App Router): in the metadata of app/layout.tsx. Next.js renders the tag for you:

export const metadata = {
  verification: {
    google: 'YOUR_CODE',
  },
}

Laravel, Django, Rails, PHP or WordPress: in the layout or template that builds the <head> of every page. On WordPress, SEO plugins have their own field for the Google verification code.

  1. Deploy and open the address in the browser. Check the page source (Ctrl + U) to confirm the tag is there.
  2. Go back to Search Console and click Verify.

Option B: HTML file

  1. On the verification page, choose HTML file and download it. Its name looks like google1234567890abcdef.html.
  2. Put the file, without changing its name or content, in the folder your application serves at the site root:
StackFolder
Vite, React, Vue, Next.jspublic/
Expressthe folder used in express.static
PHP and WordPressthe site root, next to index.php
Laravelpublic/
  1. Deploy and check that the file opens at:
https://project-name.clients.zenifra.com/google1234567890abcdef.html
  1. Go back to Search Console and click Verify.

The file address must answer directly with 200. Search Console does not follow redirects and does not log in. If App protection uses countries, bots or the challenge, add the file to Exempt paths, such as /google1234567890abcdef.html. The file verifier is not Google's search crawler and follows the normal Protection rules.

4. robots.txt and sitemap

The sitemap lists the pages you want in search. robots.txt tells search engines what they can read and where the sitemap is. Both live at the site root and are served by your application.

robots.txt allowing everything and pointing to the sitemap. The Sitemap: line uses the full address:

User-agent: *
Allow: /

Sitemap: https://project-name.clients.zenifra.com/sitemap.xml

Minimal sitemap.xml, with full addresses (https://...):

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://project-name.clients.zenifra.com/</loc>
  </url>
  <url>
    <loc>https://project-name.clients.zenifra.com/pricing</loc>
  </url>
</urlset>

On Next.js, the app/robots.ts and app/sitemap.ts files generate both for you. On static sites, put robots.txt and sitemap.xml in the public/ folder.

Each sitemap takes up to 50,000 addresses or 50 MB uncompressed. Above that, split it into several files.

After the deploy, open the property's Sitemaps report in Search Console, enter sitemap.xml and submit it.

5. Request indexing

  1. In Search Console, open the URL Inspection tool and paste the page address, such as https://project-name.clients.zenifra.com/.
  2. Click Test live URL to see the page the way Google sees it.
  3. If the test passes, click Request indexing.

Repeat for your most important pages. There is a daily limit of requests per property. Google finds the other pages through the sitemap and the links on your site.

Indexing is not immediate, and Google does not guarantee every page gets into search. Follow the progress in the property's page and performance reports.

Your own domain

For the production site, connect your own domain. The address carries your brand, and the search history stays with the domain.

With the domain connected:

  1. Create a Domain property in Search Console, such as mysite.com. It covers the root domain, www and the other subdomains.
  2. Add the TXT record Search Console shows to your domain's DNS. It does not interfere with the records that point the domain to Zenifra.
  3. Generate sitemap.xml and robots.txt with your own domain in the addresses.
  4. If the site used to live on the .clients.zenifra.com address, mark the new domain as the main address on every page with the canonical tag:
<link rel="canonical" href="https://www.mysite.com/" />

If you prefer, your application can also redirect visits that arrive through the .clients.zenifra.com address to your own domain with a 301.

Common problems

What you seeLikely causeHow to fix it
The meta tag was not foundTag outside <head>, added by JavaScript, or the home page redirecting to login or to a languagePut the tag in the HTML delivered by the server, on the page at the exact property address
Verification file not foundFile outside the public folder, renamed, or a redirectOpen the file address in a private window: it must answer 200 with the original content
The file opens, but the content does not matchThe application returns the home page for any path, common in SPAsPut the file in public/, which is served before the SPA fallback route
Page blocked (403) in the inspectionApp protection blocking by bot term or blocked IPReview Custom terms and Blocked IPs
Page excluded by the noindex tagnoindex in the application's HTML or headersRemove the noindex from the application
Server error (5xx)Project stopped or failingCheck the project status and logs in the console
Page verified but not in searchGoogle has not processed it yet or chose not to index itSubmit the sitemap, request indexing and follow the Search Console reports

FAQ

Do I need to pay anything to show up on Google?

No. Search Console and indexing are free, and Zenifra charges nothing extra for them.

Can I use a Domain property with the .clients.zenifra.com address?

No. A Domain property requires a DNS record, and Zenifra manages the DNS of clients.zenifra.com. Use URL prefix, which has the same reports for the project address.

I have several projects. Does one property cover all of them?

No. Each .clients.zenifra.com address is a different URL prefix and needs its own property, with its own verification. With your own domain, a Domain property covers all of its subdomains.

Can I block AI bots and stay on Google?

Yes. See the recipe Block AI bots without affecting Google.

Next steps

Last updated on

On this page