---
title: "Change primary URL"
url: https://docs.corefinity.com/guides/sites/go-live/change-the-site-url
type: guide
last_updated: 2026-11-13
feature: domains
related:
  - https://docs.corefinity.com/api/reference/domains/attach-site-domain.md
  - https://docs.corefinity.com/api/reference/domains/check-site-attach-domain.md
  - https://docs.corefinity.com/api/reference/domains/get-site-domains.md
  - https://docs.corefinity.com/api/reference/domains/replace-site-domains.md
  - https://docs.corefinity.com/api/reference/domains/check-site-domains-dns.md
  - https://docs.corefinity.com/api/reference/domains/point-site-domains-dns.md
  - https://docs.corefinity.com/mcp/tools/corestack_site_attach_domain_check.md
  - https://docs.corefinity.com/mcp/tools/corestack_site_attach_domain.md
  - https://docs.corefinity.com/mcp/tools/corestack_domains_get.md
  - https://docs.corefinity.com/mcp/tools/corestack_domains_update.md
  - https://docs.corefinity.com/mcp/tools/corestack_domains_check_dns.md
  - https://docs.corefinity.com/mcp/tools/corestack_domains_point_dns.md
---
# Change primary URL

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

## 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](/guides/sites/go-live/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…**.

   _Screenshot: The Change primary URL card, which moves the site to a new primary domain in three steps, with the Change primary URL… button ringed._

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**.

   _Screenshot: Step 1 of Change primary URL: the new primary host entered, and a table of the new primary, the host that redirects to it and the old primary, each marked Points at us._

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**.

   _Screenshot: Step 2 of Change primary URL for a WordPress site: the old and new address, and a table of WordPress tables, columns and rows that would change, with a total._

4. **Confirm**

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

   _Screenshot: Step 3 of Change primary URL: a summary of the primary, canonical address, old primary, DNS, certificate and database, the four things that happen, and a box to type the current domain._

   > **Warning:** 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

| Platform  | What is rewritten                                           |
| --------- | ----------------------------------------------------------- |
| WordPress | The old address in the database, including serialised data. |
| Laravel   | `APP_URL` in `.env`. There is no dry run.                   |
| Magento 2 | The Magento base URLs.                                      |
| Shopware  | The 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

**API:** [Update a site's main domain](https://docs.corefinity.com/api/reference/domains/update-site-main-domain.md), scope `write`

```bash
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"
  }'
```

**MCP:** [`corestack_url_change_apply`](https://docs.corefinity.com/mcp/tools/corestack_url_change_apply.md), scope `write`

```json
{
  "name": "corestack_url_change_apply",
  "arguments": {
    "site_id": 4211,
    "new_primary": "example.com",
    "confirm_domain": "example.co.uk"
  }
}
```

**Control Panel:** Managed Websites › your site › Site settings › Domains & HTTPS ([https://manage.corefinity.com/go/domains](https://manage.corefinity.com/go/domains))

## Related

- [Canonical address](/guides/sites/go-live/www-or-apex): Choose between www and the bare domain.
- [Redirects](/guides/sites/site-settings/redirects): Send visitors from one path to another.
- [Backups](/guides/sites/backups/snapshots): Take a backup before a change.
