jueves, julio 11, 2024

Everything You Look For On a Website

HomeHosting Pro 2023How to Change Your Domain Name for Magento 2

How to Change Your Domain Name for Magento 2


If you are rebranding your store or changing products, then a domain name change may be in the cards for you. Keep reading to learn how to change your domain name in Magento 2.

What is Magento 2?

Magento 2 is a powerful ecommerce platform. As of April 2023, it powers about 8% of all ecommerce sites. Though intended for medium-to-large online stores, Magento 2 is a great platform for SMB owners who desire out-of-the-box integration with PayPay and, as well as hard-driving SMB owners with an eye toward quickly scaling their shops.

Get fully managed Magento hosting

Accelerate your store’s potential, without the tedious maintenance

Why should you change your domain name?

There are a number of reasons why you may want to change your domain name on Magento.

1. Business name change

Whether you want a name change to reflect a change in your business focus or a court has ruled that you’re infringing on a trademark, sometimes you need to change your business name. If you change the name of your business, it can often make sense to update your domain name to reflect that change.

Example: The Worldwide Wrestling Federation decided to change its name following the 2002 court ruling that it could no longer use the initials “WWF” (and, thus, no longer allowed to use the domain name,

2. gTLD or subdomain changes

Although your gTLD has no impact on your Google Search rankings, your customers may find a .com top-level domain name easier to remember than a .store top-level domain. Similarly, a bare domain or a www subdomain might be easier for your customers to remember.

READ  Linux OS vs Windows OS for VPS Hosting: Which is Best?

Additionally, consistent site-wide usage of a bare subdomain or a www subdomain may simplify your backend use of website cookies.

Example: and are both easier to remember than are and

3. Production deployment

Some developers like to develop and stage sites under a domain name other than the domain name that will be used in production. When deploying the production site, it is important to remember to change the domain name in Magento 2.

Example: A developer might build and test a store using the URL They might change the domain name in Magento 2 to when deploying the site in production mode.

Learn how to register your domain name here.

Steps to changing the domain name in Magento 2

Changing the domain name in Magento 2 is as simple as updating the base URLs.

The directions below are for changing the domain name in a single-store Magento 2 site using the Admin Dashboard. You can also change the domain using the command line or phpMyAdmin.

1. Go to the main menu of your Admin Dashboard

2. Go to the navigation menu

Select the Web tab.

3. Open the Base URLs submenu

Open it by clicking the down arrow.

4. Update the Base URL field

Update the value by changing your old domain name to the new domain name.

5. Close the Base URLs submenu

You can do so by clicking the up arrow. Then, open the Base URLs (Secure) submenu by clicking the down arrow.

6. Go to the Secure Base URL field

Update the value by changing your old domain name to the new domain name.


7. Click Save Config

8. Test the new domain name

You can test the new base URLs by both browsing an existing product as well as by creating a temporary new test product.

Note: Though Magento is supposed to automatically update the cache, if your site is now returning 404s when using your new base URLs, you may need to manually flush your Magento cache.

Don’t forget: Update your DNS records when changing your domain name to ensure that your new domain points to your Magento store. Note that updating DNS records can sometimes be quick, but sometimes it can take up to two days. If you’re a Nexcess customer, read our article on changing domains and DNS records to learn more, and use our DNS checker tool to ensure your new domain works properly.

Now you know how to change your domain name in Magento 2

That’s it!

Whether you’re building a site from scratch or have an existing site you’d like to migrate over, we’ve got you covered. Check out our fully managed Magento hosting plans to get started today.




Please enter your comment!
Please enter your name here

Most Popular

Recent Comments