# Search Indexing

Projects published to a `surge.sh` subdomain are not indexed by search engines. Every `surge.sh` subdomain answers `/robots.txt` with:

```txt
# surge.sh subdomains are not indexed by search engines.
# Publish to a custom domain to serve this project's own robots.txt.
# https://surge.sh/docs/platform/search-indexing
User-agent: *
Disallow: /
```

This applies whether or not your project contains a `robots.txt`. Your file still publishes, but the `surge.sh` address serves the one above instead.

## Getting indexed

Publish the project to a [custom domain](https://surge.sh/docs/platform/custom-domains). Custom domains and their SSL certificates are free on every plan, and on a custom domain your project's own `robots.txt` (and a `sitemap.xml` it points to) is served exactly as published:

```sh
surge publish ./dist example.com
```

With no `robots.txt` in the project, a custom domain has no robots rules at all, and crawlers index it as normal.

## Always excluded

Some addresses tell crawlers `Disallow: /` on any domain, custom ones included:

- **[Preview addresses](https://surge.sh/docs/cli/previews)**, so a preview never competes with the domain it previews.
- **[Private domains](https://surge.sh/docs/cli/config)**, which have nothing to show a crawler without signing in.
