Tutorial: Connecting a custom domain¶
There are two ways of connecting a domain, for two different scenarios.
The first is when creating a new deployment, this is done through Console. The second scenario is when assigning new domains to an existing deployment, that is done through the “Domain Manager” in Magento’s Admin.
Set up dns for your domain¶
Your domain has to be pointed to our cluster for it to work.
It is preferred that you use an A pointer to the chosen clusers Loadbalancer IP, you can find that IP in the cluster list.
It is recommended that you as a partner point some wildcard domain to that IP, to make it easier to set up stores on the fly without having to configure DNS first. Just make sure that you reserve that domain.
It is also recommended that you use one of your domains first when setting up new production sites, like <customername>.your-company.com. That way you (and your customer) can always access the sites admin, even before the sites “real” domain is connected.
You can not successfully assign a domain to a deployment until the domain actually points to our cluster.
Assigning new domains to an existing deployment¶
First you need to Set up dns for your domain, then you sign in to the admin for the specific store.
- Go to Add new domain and click
- Fill in Domain name. This is the full domain name, without protocol. For example “www.examle.com”. Note: if you want to connect both with and without www, you have to do this step for each subdomain.
- Click Save Domain
- Your domain should now be visible in the grid with a status
- Once your domain has status
Confirmedyou can assign it to a website or storeview
- The domain is being created in Console
- Pending DNS
- The domain is not connected to the cluster yet
- The domain is ready to use
- The domain was not accepted by Console, probably due to duplication
- Pending deletion
- The domain is deleted in Magento, and is awaiting deletion in Console
Some of these statuses will never be visible since they usually pass very quickly.
Assigning a domain to website or store view¶
This describes how to assign a domain that has status
Confirmed to a specific website or store view.
- Go to Stores -> Domain Assignment and click Add new assignment
- Select the domain you want to assign
- Select the scope you want to assign it to, chose either a Website OR a Store view
- Select if the assignment is master
- Click Save Domain Assignment
- Clear Magento’s Cache, then the domain should work.
Master domain assignment¶
An assignment that is marked as master will be the “main” domain for that scope, in Magento terms it is set as the “base url”. That means that all links printed will use this domain, and all requests to other “non master” domains will be redirected to the master in the same scope.
That also means that you can have many “non master” assignments that all redirect to the same store. For instance when www and “non-www” should point to the same store.