Request a custom domain
By default, PubNub clients connect to ps.pndsn.com. You can replace this with your own subdomain. Common reasons include:
- Branding. App traffic appears under your domain rather than PubNub's.
- Compliance. Legal or regulatory requirements mandate custom domains for data access and tracking.
- Infrastructure integration. Better fit with your existing security, CDN, or networking setup.
- Traffic management. Allows PubNub to route traffic per customer when a point of presence (PoP) is underperforming.
Before you start
Confirm you have:
- A PubNub Pro plan with at least one production keyset. See Plan comparison.
- Your PubNub account email (the one associated with the Pro plan).
- Requesting a custom domain requires three subdomain name preferences, each 12 characters or fewer. For example,
abc.pubnubapi.com. - A list of PubNub SDKs your applications use, including the language name and version.
Secure connections
Ensure all clients connect over HTTPS, not HTTP. HTTPS encrypts data in transit and prevents man-in-the-middle attacks.
Steps
- Email support@pubnub.com with the subject Request Custom Origin.
- Include the following in the email:
- The PubNub account email associated with your paid production keyset.
- Your subdomain name preferences, in order of preference.
- The PubNub SDKs your applications use: SDK language or name and version number.
- Whether any of your customers or devices are located in China. If so, include that detail.
- PubNub support confirms your custom origin name and provides SDK initialization code for the SDK version you use.
Use the custom domain
Once PubNub confirms your custom origin, initialize PubNub with the origin parameter set to your assigned subdomain. See the origin parameter in the SDK configuration reference for your SDK. With a custom domain, all PubNub traffic uses one host name, so the browser's per-host connection limit applies to your app. See Browser connection limits.
TLS certificate hosting
PubNub provides TLS certificate hosting for custom domains. When TLS is used with a custom domain, you must supply your own certificate. This service incurs an additional monthly fee. Include this requirement in your email.