Skip to content
All notes
  • SEO
  • Next.js
  • Google Search Console
  • Web

My portfolio is online… but Google can't see it yet

Deploying a site to production isn't enough for it to appear in search results. Feedback on robots.txt, sitemaps, hreflang, favicons, and Search Console with Next.js.

Bendy ServilusBendy SERVILUS3 min read
Mon portfolio est en ligne…

The evening I put bendyservilus.com online, I did what every developer does: I typed my name into Google. Result: nothing. Not a single page of the site.

My first instinct was to look for a bug. There wasn't one. The site was simply too new. But this check forced me to review, point by point, everything that allows a search engine to find, understand, and display a site.

An online site is not an indexed site

Google doesn't discover a domain the moment it is deployed. It first needs to find it, either via a link from a page it already knows, or because it is pointed out to it. Then, it crawls the pages, and finally decides to add them to its index. These three steps—discovery, crawling, and indexing—can take anywhere from a few hours to several weeks.

Before waiting, you must therefore make sure that nothing is blocking the path.

1. The robots tag

This is the first thing to check. A simple noindex tag left over from the development environment is enough to make a site invisible. On my site, the value is index, follow: nothing prevents indexing.

With Next.js App Router, it is defined in the metadata object:

export const metadata = {
    robots: {
        index: true, follow: 
        true 
    },
};

2. The robots.txt file

It tells bots what they are allowed to crawl. I authorize public pages there and block private areas: the dashboard, the login page, and the API.

Two lessons along the way:

  • A specific User-Agent: Googlebot group completely replaces the User-Agent: * group for that bot. If you create one, it must include all the rules, not just the additions.

  • The Host: directive is ignored by Google. It doesn't hurt, but it's useless.

The most useful line in the file is this one:

Sitemap: https://bendyservilus.com/sitemap.xml

3. The sitemap and language versions

My site exists in French and English. To help Google understand that /fr/cv and /en/cv are the same page in two languages, and not duplicate content, each URL in the sitemap declares its alternatives using hreflang.

An improvement I hadn't made: adding an x-default entry, which indicates which version to serve when the visitor's language is neither French nor English.

<xhtml:link rel="alternate" hreflang="x-default"
href="https://bendyservilus.com/fr" />

4. The canonical URL

When the same content is accessible via multiple addresses, the canonical tag designates the official address. Mine points to /fr, which prevents Google from hesitating between / and /fr.

5. The favicon, more important than it seems

In Google mobile results, the favicon appears next to the site name. For it to be remembered, it must be declared by a <link rel="icon"> tag, and its size must be a multiple of 48 pixels.

I had used an old generator that produced a collection of outdated files: Windows tiles and a manifest without a 512x512 icon. Next.js simplifies all of this. You just need to place the files in the app/ folder:

app/
    favicon.ico
    icon.png
    apple-icon.png
    manifest.ts

The framework generates the correct tags itself.

6. Notifying Google rather than waiting

Once everything is checked, all that's left is to signal the site:

  1. Add the domain in Google Search Console.

  2. Submit the sitemap.

  3. Use URL inspection then "Request Indexing" on the homepage.

  4. Do the same in Bing Webmaster Tools, which can directly import the Search Console configuration.

To monitor progress, a simple site:bendyservilus.com search on Google shows the pages already indexed.

7. Links, the most underestimated shortcut

Google discovers a site faster when it is pointed to by other sites it already knows. So I added the link to my portfolio everywhere I already have a presence: GitHub, LinkedIn, my Coding Club Haiti profile, and the projects I've delivered.

What I take away

Deployment is only half the job. The other half is making the site readable for the machines that will present it to humans. None of these steps are complex, but each one can, if forgotten, render weeks of work invisible.

I will update this article with the actual time it took for the site to appear in the results.

Share this note

Comments

No comments yet. Be the first to share your thoughts.

Leave a comment

Never published. Only used to reply to you privately.

Comments are published after review.