Skip to content

Create spaces-custom-domain.md #1746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/hub/spaces-custom-domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Spaces Custom Domain

<Tip warning={true}>
This feature is still in Beta.
</Tip>

<Tip warning={true}>
Spaces Custom Domain feature is part of PRO and Enterprise Hub subscriptions.
</Tip>

## Getting started with a Custom Domain

Spaces Custom Domain is a feature that allows you to host your space in a custom domain of your choosing: yourdomain.example.com 🚀 The custom domain must be a valid DNS name.

<div class="flex justify-center">
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/custom-domain-feature_light.png"/>
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/custom-domain-feature_dark.png"/>
</div>

## Using a Custom Domain

You can submit a custom domain to host your space in the settings of your Space, under "Custom Domain". You'll need to add the CNAME Record Type:

<div class="flex justify-center">
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/custom-domain-dns_light.png"/>
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/custom-domain-dns_dark.png"/>
</div>

The request will move to 'pending' status after submission as seen below.

<div class="flex justify-center">
<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/custom-domain-pending_light.png"/>
<img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/custom-domain-pending_dark.png"/>
</div>

Please make sure to point the domain to Hugging Face Spaces. Once set up, you'll see a 'ready' status to know the custom domain is active for your Space 🔥

## Removing a Custom Domain

Simply remove a custom domain by using the delete button to the right of “Custom Domain” in the settings of your Space. You can delete while the custom domain is pending or in ready state.