CorefinityCorefinityDocs
Open the Control PanelControl Panel
Go live · 7 of 7

Change primary URL

Move a live site to a new primary domain, with a dry run first.

On this page

Before you start

  • You can open the site in Managed Websites. Anyone who can open a site can change its primary URL.
  • The site has a domain attached, maintenance mode is off and Hostnames has no unsaved changes.
  • The new host's DNS points at the site, so its certificate can be issued: see Check and point DNS.

Change the primary URL

  1. Open the dialog

    Go to Managed Websites, choose the site, then Domains & HTTPS under Site settings. Under Change primary URL, choose Change primary URL….

  2. Enter the new host and check it

    Enter the New primary host and choose Check, which shows where the new host, its www or bare twin and the old primary point today. Choose Next: dry run.

  3. Read the dry run

    The dry run counts every stored address that would change and changes nothing. Read the report, then choose Next: confirm.

  4. Confirm

    Check the summary and What happens. Type the current primary domain, then choose Change primary URL to and the new host.

    The site's stored addresses are rewritten and there is no undo. To go back, run the change again the other way.

Domains & HTTPS follows the change, which takes about a minute, and ends with The site now answers on the new host as its primary. The old primary keeps serving the site until then.

What changes

PlatformWhat is rewritten
WordPressThe old address in the database, including serialised data.
LaravelAPP_URL in .env. There is no dry run.
Magento 2The Magento base URLs.
ShopwareThe storefront domains and the shop address.
  • The old primary and its www twin stay as aliases that redirect to the new primary.
  • Files, SSH, SFTP, deployments and the email sending domain do not change.
  • A dry run is valid for 15 minutes.

Automate this

Change primary URL

Starts the change that a preview described.

POST/api/corestack/sites/{site}/url-change
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/url-change \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_domain": "harbourandfinch.example.com",
    "new_primary": "harbourandfinch.example.net",
    "preview_token": "pReViEw-ToKeN-0123456789abcdefghijklmnopqr",
    "www": "bare"
  }'
Was this helpful?
Open in ClaudeOpen in ChatGPT