Skip to content
INFRASTRUCTURE·6 min read

Custom domains with sane defaults: HTTPS, redirects and SEO

What happens when you add a domain on Neatploy: one-time ownership checks, automatic certificates, a www-to-apex redirect, and no duplicate pages in search results.

Neatploy Engineering · Edge & Networking Team
#domains#tls#seo#edge#security
Cover: a service with a custom domain, automatic HTTPS and a www redirect

Putting an app on your own domain should take a minute. Behind that minute there are a handful of details that are easy to get wrong: certificates, redirects, headers and search engines that see the same site twice. Neatploy handles them by default, so you only have to answer one question.

Every service gets an address straight away

A public web service gets a generated HTTPS address the moment it first goes live, shaped like web-production-shop-k3x9.up.neatploy.com. It's useful for testing and for sharing a staging build, and it keeps working after you add your own domain.

Proving you own the domain, once

When you add example.com, Neatploy shows a TXT record to create at your DNS provider. Once it's there, your organisation has proved it owns example.com, and any other hostname under it, api.example.com, www.example.com or staging.example.com, can be added to any service in the organisation without another TXT record. A background job re-checks ownership, so a domain that changes hands doesn't stay attached.

Then point the hostname at Neatploy with the CNAME or A record the dashboard shows.

Certificates you never think about

The edge requests a TLS certificate the first time a visitor reaches your hostname and renews it automatically. There's nothing to upload and no expiry date to put in a calendar. Plain HTTP requests get a permanent 308 redirect to HTTPS, and if your app doesn't send its own Strict-Transport-Security header, the edge adds one.

The one question: www or not?

The Add domain dialog offers to connect both example.com and www.example.com and asks which one is the primary. The other answers with a permanent 308 redirect to it, paths and query strings included. You don't need to write a redirect rule, and visitors, links and search engines all end up on one address.

No duplicate pages in search results

A site that answers on two hostnames looks like duplicate content to search engines, which can split your ranking between them. Neatploy avoids that in two ways:

  • Generated addresses step aside. Once a service has a custom domain, its *.up.neatploy.com address sends X-Robots-Tag: noindex, so only your domain is indexed.
  • Non-production stays out. Every environment other than production sends noindex by default, so a staging site never shows up in search, even if someone links to it.

If unreleased work shouldn't be visible at all, turn on password protection for the environment: the edge then asks for a password on every hostname in it.

Protection at the edge

Every request passes through the edge before it reaches your app, and a few protections are on without any setup:

  • Internal headers are stripped. Headers such as x-middleware-subrequest, which let attackers skip Next.js middleware (CVE-2025-29927), are removed from incoming requests.
  • Scanner probes get banned. Clients probing for things like /.env or wp-login.php on a site that isn't WordPress are blocked at the firewall.
  • Edge rules are yours to add. Allow or block paths and addresses, add redirects, or rate-limit an endpoint, per service, from the dashboard.

Try it

Add a domain from your service's settings, or read the domains and networking guide for the records to create and the limits that apply.

Deploy your next project on Neatploy.

Start with $5 in monthly credit on your first verified organisation. Connect a GitHub repository, add PostgreSQL or Redis, or deploy a pre-built template.