# For your Phoenix app - how did you configure nonwww and www domains in your DNS?

**URL:** <https://community.fly.io/t/for-your-phoenix-app-how-did-you-configure-nonwww-and-www-domains-in-your-dns/9502>\
**Category:** Questions / Help\
**Tags:** elixir\
**Created:** [December 20, 2022, 3:08pm UTC](https://community.fly.io/t/for-your-phoenix-app-how-did-you-configure-nonwww-and-www-domains-in-your-dns/9502 "2022-12-20T15:08:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergio](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/sergio/32/44841_2.png) [@sergio](https://community.fly.io/u/sergio)\
**Post date:** [December 20, 2022, 3:08pm UTC](https://community.fly.io/t/for-your-phoenix-app-how-did-you-configure-nonwww-and-www-domains-in-your-dns/9502/1 "2022-12-20T15:08:36Z")

</div>

Here’s what my DNS settings look like at the moment on Namecheap.

 ![image](https://global.discourse-cdn.com/fly1/original/3X/2/9/2992b9176c011c6f20933e4bd5ba443b42c330d5.png)

And in my endpoint I’m only listening to the `www` domain and that `www` domain works. **But when I visit the nonwww I want to redirect to the `www` endpoint.**

```auto
config :my_app, MyAppWeb.Endpoint,  
  url: [host: "www.myapp.com", port: 80],

```

Render has pretty clear instructions on how to do this and it works fine.

 ![image](https://global.discourse-cdn.com/fly1/original/3X/6/7/6759bc6bf79ffc375b819bf8d8d2061370cd12a8.png)

Does anyone have tips for [Fly.io](http://Fly.io)? Thank you
