Skip to content
WP Cloud
WP Cloud
    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management
    • PanelAlpha Integration: White-Label WordPress Control Panel for Hosts
    • EasyEngine Panel Integration: Visual WordPress Management for WP Cloud
    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
    • Pressable
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Impressive Hosting
    • Blog
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗
  • Solutions

    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Featured Partners

    Features

    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management

    Integrations

    • PanelAlpha Integration
    • Easy Engine Panel Integration

    Resources

    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
  • Case Studies
    • PressableA case study about how WP Cloud supports Pressable to power millions of page views daily.
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Newspack
    • Inverse Paradox
  • Insights
    • Podcast
    • BlogWP Cloud blog page with latest news and updates about the platform.
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗

Browse

    • WP Cloud platform overview
    • Onboard and launch with WP Cloud
    • WP Cloud Partner Portal
    • Get support from WP Cloud
    • WP Cloud glossary
    • Manage and secure API keys
    • Client SSH
    • WP Cloud API quick start
    • Webhooks
    • Run bulk tasks across sites
      • Manage site domains and aliases
      • Domain verification records
      • TLS certificates
      • Manage custom TLS certificates
      • Cloudflare and WP Cloud
    • Clone a site
    • Configure resources, site type, and billing with site meta
    • Delete a site
    • Persistent data
    • Staging sites
    • Migrate a site to WP Cloud
      • SSH and SFTP access models
      • Client SSH
      • User SSH and SFTP access
      • Database credentials
      • phpMyAdmin
      • ABSPATH
      • Default wp-config.php
      • Site constants
      • Configure redirects and headers with custom-redirects.php
      • Akismet and Jetpack
      • Blocked and unsupported plugins
      • PHP lifecycle and supported versions
      • Symlinks and managed software
      • WordPress versions
      • Install Composer and WP-CLI packages
      • Manage platform software with WP-CLI
      • Useful WP-CLI commands
    • Transactional email
    • WordPress multisite
    • Cron scheduling
    • Decoupled and headless WordPress
    • Repair Yoast indexables
      • Page Cache
      • Edge Cache
      • Object Cache
      • Image transformation
      • Offload image sub-sizes
    • Configure lightweight 404s for static files
      • DDoS protection
      • Defensive Mode
      • Rate limiting
      • Network and web application firewalls
      • Bot protection
      • Password protection
      • HTTP and security headers
      • PHP filesystem access permissions
      • Scan a site for malware
    • Backups overview
    • Create an on-demand backup
    • Restore a backup
    • Jetpack backups
      • Error logs
      • Web server logs
    • Metrics
    • Application performance monitoring
    • Automated failover
    • IP ranges
    • Origin and edge servers
    • Server specifications and settings
    • EasyEngine integration
    • PanelAlpha integration
      • White labelling and co-marketing WP Cloud
      • WP Cloud logos
      • Terms of Service & Compliance
      • Prohibited content
      • Copyright infringement and takedown notifications
    • WP Cloud billing
    • WP Cloud for agencies and site networks
    • WP Cloud partner support options
    • Troubleshoot Page and Edge Cache
    • Troubleshoot HTTP 429 and 599 errors
    • WP Cloud HTTP status codes
    • Troubleshoot site performance
    • Cache slow database queries
    • Troubleshoot duplicate core files, wp-config.php, and wp-admin 403 errors
    • Troubleshoot email delivery
    • Troubleshoot PDF thumbnail generation
    • Troubleshoot TLS certificate provisioning
Documentation/Sites/Domains/Manage site domains and aliases

Manage site domains and aliases

LAST UPDATED

3 months ago

    A WP Cloud site has one primary domain and can have secondary domains. Requests to a secondary domain normally redirect to the primary domain. Host partners can use the WP Cloud API to check whether a domain is available, manage secondary domains, retrieve suggested DNS addresses, and change the primary domain.

    The examples use these placeholders:

    • <api-key> is a WP Cloud API key with access to the site.
    • <client> is the host client’s WP Cloud identifier.
    • <site-id> is the site’s Atomic Site ID.
    • <current-domain> is the site’s current primary domain.
    • <new-domain> is the domain being added or promoted.

    Keep the Atomic Site ID as the site’s permanent identifier in partner systems. The site ID does not change when its primary domain changes.

    Check whether WP Cloud can host the domain

    Before creating a site or adding a domain, use the Validate Domain Eligibility endpoint:

    curl --fail-with-body --silent --show-error \
      --header "Auth: <api-key>" \
      "https://atomic-api.wordpress.com/api/v1.0/check-can-host-domain/<client>/<new-domain>"Code language: HTML, XML (xml)

    An available domain returns allowed: true:

    {
      "message": "OK",
      "data": {
        "allowed": true
      }
    }Code language: JSON / JSON with Comments (json)

    The check returns false for a domain that is already hosted on WordPress.com or WP Cloud, even when the domain is valid. Check eligibility before site creation as well as before adding a secondary domain to avoid a domain collision.

    Add, list, or remove a secondary domain

    Use the Manage Site Aliases endpoint to add a secondary domain. This example finds the site by its Atomic Site ID:

    curl --fail-with-body --silent --show-error \
      --header "Auth: <api-key>" \
      "https://atomic-api.wordpress.com/api/v1.0/site-alias/<client>/<site-id>/add/<new-domain>"Code language: HTML, XML (xml)

    A successful response includes the site’s secondary domains:

    {
      "message": "OK",
      "data": {
        "domains": ["www.example.com"]
      }
    }Code language: JSON / JSON with Comments (json)

    List the current secondary domains with the list action:

    curl --fail-with-body --silent --show-error \
      --header "Auth: <api-key>" \
      "https://atomic-api.wordpress.com/api/v1.0/site-alias/<client>/<site-id>/list"Code language: HTML, XML (xml)

    Remove a secondary domain with the remove action:

    curl --fail-with-body --silent --show-error \
      --header "Auth: <api-key>" \
      "https://atomic-api.wordpress.com/api/v1.0/site-alias/<client>/<site-id>/remove/<new-domain>"Code language: HTML, XML (xml)

    The API does not allow the primary domain to be removed as an alias. Change the primary domain first when the old primary domain should be removed from the site.

    WP Cloud secondary domains redirect to the primary domain. They do not make WordPress generate page and post links for each secondary hostname. A partner that needs different domain behavior must provide that behavior separately and account for WordPress’s absolute URLs.

    Control alias canonicalization

    WP Cloud normally canonicalizes secondary domains by redirecting them to the primary domain. The canonicalize_aliases site-meta value controls this behavior.

    Set canonicalize_aliases to false only when the WordPress installation must serve its secondary domains directly. The main use case is a domain-based WordPress multisite network, where different domains are mapped to different subsites.

    Disabling canonicalization removes WP Cloud’s normal alias-to-primary redirects. WordPress, a plugin, or partner-maintained code must then handle any required www, non-www, or domain-to-domain redirects. The setting does not define individual redirect rules; it determines whether WP Cloud redirects all secondary domains to the primary domain before WordPress handles the request. Setting it back to true on a site that serves several domains redirects those aliases to the primary domain with HTTP 301 responses.

    Change the value with the Site Meta endpoint. Do not disable it for an ordinary site when every secondary domain should continue redirecting to the primary domain.

    Retrieve suggested DNS addresses

    Use the Get Client IP Addresses endpoint to retrieve the WP Cloud range and suggested A record addresses for a domain:

    curl --fail-with-body --silent --show-error \
      --header "Auth: <api-key>" \
      "https://atomic-api.wordpress.com/api/v1.0/get-ips/<client>/<new-domain>"Code language: HTML, XML (xml)

    Example response:

    {
      "message": "OK",
      "data": {
        "ips": ["192.0.78.128/25"],
        "suggested": ["192.0.78.150", "192.0.78.200"]
      }
    }Code language: JSON / JSON with Comments (json)

    Use the suggested addresses for the domain’s A records unless the host client’s WP Cloud configuration specifies otherwise. Domain verification records explains the TXT record WP Cloud may require when another host client already uses the domain.

    Change the primary domain

    Add the new domain as a secondary domain and configure its DNS before promoting it. Confirm that WP Cloud can serve the domain and provision its TLS certificate.

    Send a POST request to the Update Site Domain endpoint:

    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: <api-key>" \
      "https://atomic-api.wordpress.com/api/v1.0/update-site-domain/<client>/<site-id>/<new-domain>/keep"Code language: HTML, XML (xml)

    The response identifies the queued job, the site, and both domains:

    {
      "message": "OK",
      "data": {
        "job_id": 2345,
        "atomic_site_id": 5678,
        "domain_name": "www.example.com",
        "old_domain_name": "example.com"
      }
    }Code language: JSON / JSON with Comments (json)

    The keep value retains the old primary domain as a secondary domain. Pass false instead when the old domain should be removed. Check the returned job with the Get Job Statuses endpoint before updating systems that depend on the new primary domain.

    Changing the WP Cloud primary domain does not replace every domain stored by WordPress, plugins, themes, or partner systems. Update any affected URLs as part of the host partner’s domain-change process.

    Previous Run bulk tasks across sites
    Next Domain verification records

    Related Guides

    • Domain verification records

      Publish WP Cloud DNS TXT verification records when a domain is already assigned to a…

      2 Min.

      READ

    • TLS certificates

      Understand how WP Cloud provisions, installs, and renews TLS certificates for site domains.

      2 Min.

      READ

    • Manage custom TLS certificates

      Validate, stage, activate, renew, deactivate, and remove partner-supplied TLS certificates safely.

      3 Min.

      READ

    On this page

      Contact support

      Contact us with Support issues and questions related to WP Cloud, the WP Cloud Atomic API, API-key IP allow list changes, Station, and more.

      Check the FAQs

      Have questions? Please visit our FAQ to learn more.

      An Automattic venture

      Work With Us

      Press

      Privacy Policy

      © 2021-2026 Automattic Inc.

      Notifications