# 在 app.yml 中“DISCOURSE\_HOSTNAME:”之后有引号吗？

**URL:** https://meta.discourse.org/t/is-there-a-quote-after-discourse-hostname-in-app-yml/53142
**Category:** Support
**Created:** [2016年十一月20日 12:17 UTC](https://meta.discourse.org/t/is-there-a-quote-after-discourse-hostname-in-app-yml/53142 "2016-11-20T12:17:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![saluzi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/saluzi/32/77568_2.png) [@saluzi](https://meta.discourse.org/u/saluzi)
#### Post date: [2016年十一月20日 12:17 UTC](https://meta.discourse.org/t/is-there-a-quote-after-discourse-hostname-in-app-yml/53142/1 "2016-11-20T12:17:36Z")

</div>

Which of the following format is correct in app.yml ? A quotation mark, a no. Thanks

## TODO: The domain name this Discourse instance will respond to

1. DISCOURSE\_HOSTNAME: `'discourse.example.com'`

2. DISCOURSE\_HOSTNAME: `discourse.example.com`

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [2016年十一月20日 17:48 UTC](https://meta.discourse.org/t/is-there-a-quote-after-discourse-hostname-in-app-yml/53142/2 "2016-11-20T17:48:56Z")

</div>

> [@saluzi](#):
>
> 1. DISCOURSE\_HOSTNAME: `'discourse.example.com'`

This is correct. The `app.yml` is expecting single quotes.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [2016年十一月20日 21:51 UTC](https://meta.discourse.org/t/is-there-a-quote-after-discourse-hostname-in-app-yml/53142/3 "2016-11-20T21:51:53Z")

</div>

I think YAML allows either form with or without quotes.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024年六月8日 12:45 UTC](https://meta.discourse.org/t/is-there-a-quote-after-discourse-hostname-in-app-yml/53142/4 "2024-06-08T12:45:08Z")

</div>

此主题已在 2757 天后自动关闭。不再允许回复。
