To enable a custom domain for your Gemfury account, follow these steps:
- Register and configure your domain via your registrar
- Go to your dashboard and choose the correct account
- Select the Settings tab and then Domains
- Enter your domain and click Add
Configuring DNS for your custom domain
After adding your domain to your account, you’ll need to work with your DNS provider to point your domain to Gemfury. This is done by creating a CNAME record for your domain as follows:
| Record | Name | Target |
|---|---|---|
| CNAME | repo | example-target.furyns.com. |
Configuring DNS for an apex domain
To set up an apex domain without a subdomain, such as yourcustomdomain.com,
you must configure a similar ALIAS or ANAME record with your DNS provider.
| Record | Name | Target |
|---|---|---|
| ALIAS | @ | example-target.furyns.com. |
Apex aliases are a non-standard DNS feature, so not all DNS providers support them.
Testing your custom domain
To recognize and serve your repository index, your DNS record must point to
Gemfury’s custom domains endpoint. To confirm that your CNAME is active, use
the dig command:
$ dig repo.example.com +nostats +nocomments +nocmd
repo.example.com. 3554 IN CNAME example-target.furyns.com.
Using your repository via custom domains
Once you’ve configured your domain, all Gemfury repositories are available as top-level paths of your custom domain. In your configuration, you would replace your repository URLs are follows:
| Repo | Standard Repo-URL | With custom domain |
|---|---|---|
| RubyGems | https://gem.fury.io/REPO/ | https://repo.example.com/gem/ |
| Javascript npm | https://npm.fury.io/REPO/ | https://repo.example.com/npm/ |
| PHP Composer | https://php.fury.io/REPO/ | https://repo.example.com/php/ |
| Python PyPI | https://pypi.fury.io/REPO/ | https://repo.example.com/pypi/ |
| APT/DEB | https://apt.fury.io/REPO/ | https://repo.example.com/apt/ |
| YUM/RPM | https://yum.fury.io/REPO/ | https://repo.example.com/yum/ |
| NuGet | https://nuget.fury.io/REPO/ | https://repo.example.com/nuget/ |
These custom-domain URLs can be directed to either private and public repositories
by including or excluding an access token via Basic Auth (ie. Authorization header).