Prompt

How do I host API docs on a custom domain?

Technology / Documentation Tools1 observationLast seen Oct 16, 2026

Latest observation

Oct 16, 2026OpenAI APIWeb search: off

You can host API docs on a custom domain by treating the docs like any other static site or web app, then pointing a DNS record at the hosting provider and configuring the docs app to run under that domain.

Typical setup

1) Choose where the docs will be hosted

Common options:

  • Static hosting: GitHub Pages, Netlify, Vercel, Cloudflare Pages, S3 + CloudFront
  • Docs platforms: ReadMe, Mintlify, Stoplight, Docusaurus on your own host

2) Buy or use a domain

Example:

  • docs.yourcompany.com
  • api-docs.yourcompany.com
  • developers.yourcompany.com

A subdomain is usually easiest.

3) Add a DNS record

In your DNS provider, create a record pointing the subdomain to your hosting provider.

Examples:

  • CNAME: docs → your-site.netlify.app
  • A record: docs → server IP
  • ALIAS/ANAME: for apex/root domains like yourcompany.com

4) Configure the hosting provider

Most providers have a place to:

  • add the custom domain
  • verify ownership
  • automatically provision HTTPS/SSL

5) Update the docs app base URL if needed

If your docs site generates links/assets, set the correct base URL so navigation and API references work properly.

Examples:

  • Docusaurus: set url and baseUrl
  • Next.js: set basePath if hosted under a subpath
  • Swagger UI / OpenAPI docs: configure the docs endpoint and asset paths

6) Enable HTTPS

Make sure SSL is active so the docs load securely on the custom domain.


Example: hosting on docs.example.com

If using a static host:

  1. Deploy docs site
  2. In DNS, add:
    • docs.example.com as a CNAME to your provider’s target
  3. In hosting dashboard, add docs.example.com
  4. Wait for DNS propagation
  5. Confirm HTTPS is enabled

If you want docs under a path instead of a subdomain

Example: example.com/docs

That’s possible, but a bit more involved:

  • your app must support a base path
  • your main website/server must route /docs to the docs app
  • static hosts often prefer a subdomain

Subdomain is the recommended approach.


Common gotchas

  • DNS changes can take time to propagate
  • Use the correct record type for your provider
  • Make sure asset paths and redirects account for the custom domain
  • If the docs are behind auth, configure cookies/CORS accordingly
  • If your API docs call an API server, ensure the API allows requests from the docs domain

If you tell me what you’re using to generate/host the docs (for example: Docusaurus, Swagger UI, ReadMe, Mintlify, GitHub Pages, Vercel, etc.), I can give you exact steps.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.