# Certicificates and domainnames with Multisite

**URL:** https://community.kinsta.com/t/certicificates-and-domainnames-with-multisite/663
**Category:** Application Support
**Created:** [May 6, 2021, 9:36am UTC](https://community.kinsta.com/t/certicificates-and-domainnames-with-multisite/663 "2021-05-06T09:36:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![helenagwyn](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@helenagwyn](https://community.kinsta.com/u/helenagwyn)
#### Post date: [May 6, 2021, 9:36am UTC](https://community.kinsta.com/t/certicificates-and-domainnames-with-multisite/663/1 "2021-05-06T09:36:05Z")

</div>

Hi, I would like to create a multisite with real domainnames pointing to my local environment. I know how to change the domainnames in the settings of each site, except for the default one. I know how to edit the hosts-file on my mac. I don’t know how to change the domainname for the first site. I don’t know how to generate certificates for them. And will this impact when they go live at some point? Any help appreciated.

---

<div class="post-metadata">

### Author: ![jeff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jeff/32/16_2.png) [@jeff](https://community.kinsta.com/u/jeff)
#### Post date: [May 6, 2021, 4:08pm UTC](https://community.kinsta.com/t/certicificates-and-domainnames-with-multisite/663/2 "2021-05-06T16:08:20Z")

</div>

Hi Helenagwyn,

In order to edit your hosts file, you’ll need to open up the /etc/hosts file. I find that it’s easiest to do this from the terminal window with nano but you can also just edit this file with any editor.

You can look at the existing records to use as an example but it should always be in the following format:

IP DOMAIN

So in this case, if your domain is test.tld, you would add:  
`127.0.0.1 test.tld`

The primary domain for the first site is set in a couple of places, first, you’ll want to check your wp-config file and update the domain there.

You’ll need to update the database to replace the domain with the one you wish to use. You can use wp-cli for this or you can use the DB editor. Look for `prefix_1_options`

You’ll need to edit `siteurl` and `home`

You’ll also want to look for the `prefix_blogs` table and edit the domain set with the ID of `1` to match the domain for your primary site.

Let me know if that helps you in the right direction!

---

<div class="post-metadata">

### Author: ![helenagwyn](https://avatars.discourse-cdn.com/v4/letter/h/e495f1/32.png) [@helenagwyn](https://community.kinsta.com/u/helenagwyn)
#### Post date: [May 6, 2021, 4:24pm UTC](https://community.kinsta.com/t/certicificates-and-domainnames-with-multisite/663/3 "2021-05-06T16:24:08Z")

</div>

Thank you for your reply. I will give it a try.

On top of this, how do I generate a certificate for these domains to be able to use HTTPS?

---

<div class="post-metadata">

### Author: ![jeff](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jeff/32/16_2.png) [@jeff](https://community.kinsta.com/u/jeff)
#### Post date: [May 6, 2021, 5:11pm UTC](https://community.kinsta.com/t/certicificates-and-domainnames-with-multisite/663/4 "2021-05-06T17:11:04Z")

</div>

At this time DevKinsta will only cover the primary domain and any wildcards from it, ie yourdomain.tld and \*.yourdomain.tld

It’s not currently possible to generate certificates for other domains, but you should still be able to load those locally over HTTP as long as they are set to use HTTP in the database.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [July 9, 2021, 4:45pm UTC](https://community.kinsta.com/t/certicificates-and-domainnames-with-multisite/663/5 "2021-07-09T16:45:36Z")

</div>

We haven’t heard back from you on this topic in a while. However, if you do need further assistance you can simply start a new conversation. Thank you again for using DevKinsta. Let us know if you need further assistance! 👋

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [July 9, 2021, 4:45pm UTC](https://community.kinsta.com/t/certicificates-and-domainnames-with-multisite/663/6 "2021-07-09T16:45:39Z")

</div>


