# Blog.com works but www.blog.com doesn't?

**URL:** <https://forum.ghost.org/t/blog-com-works-but-www-blog-com-doesnt/30603>\
**Category:** Self-hosting\
**Created:** [June 3, 2022, 5:07pm UTC](https://forum.ghost.org/t/blog-com-works-but-www-blog-com-doesnt/30603 "2022-06-03T17:07:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegohernandez](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/diegohernandez/32/18065_2.png) [@diegohernandez](https://forum.ghost.org/u/diegohernandez)\
**Post date:** [June 3, 2022, 5:07pm UTC](https://forum.ghost.org/t/blog-com-works-but-www-blog-com-doesnt/30603/1 "2022-06-03T17:07:12Z")

</div>

So it’s my first time deploying any Ghostblog and I chose to use Google Compute Engine to do so. I’ve managed to figure it out quite a bit but I stumbled upon something strange that I’m not sure how to approach.

When setting up Ghost via `ghost setup` I go through a series of questions as described [here](https://ghost.org/docs/install/ubuntu/#install-questions). When asked for my blog’s domain, I enter `https://farodefe.org` which is what the tutorial indicates. During setup, Let’s Encrypt is able to grant me an SSL certificate and everything. The setup ends successfully and I’m able to go enter _[https://farodefe.org](https://farodefe.org/)_ in any browser and see the website. Nevertheless, when I enter _[https://www.farodefe.org](https://www.farodefe.org/)_ (in any browser) I only see a `502 Bad Gateway` screen. The funny thing is that if I go through the setup again and I enter `https://www.farodefe.org` instead, then `https://www.farodefe.org` works but `https://farodefe.org` gives me a 502 Bad Gateway.

I’m not sure where the problem may rely. Evidently, it has to do something that happens during Ghost setup, but I’m not sure if it is a Nginx issue, or a Let’s Encrypt issue or a Ghost issue. I don’t think it is a DNS problem since it was setup correctly about a day ago and just to be sure I `dig` traced both the A and the CNAME register.

Any clues as to what could it be? Any insights into how to troubleshoot this phenomenon? Any Ghost/GoogleComputeEngine experts out there that could lend me a hand? Thanks in advance from a 17 year old guy who’s playing to be a serious developer!

---

<div class="post-metadata">

**Author:** ![RyanF](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/ryanf/32/17448_2.png) [@RyanF](https://forum.ghost.org/u/RyanF)\
**Post date:** [June 3, 2022, 5:41pm UTC](https://forum.ghost.org/t/blog-com-works-but-www-blog-com-doesnt/30603/2 "2022-06-03T17:41:32Z")

</div>

Ghost only supports a single domain. So, you can’t have both www and your root domain set up at the same time. Instead, you have to redirect one of your domains.

See this part of the Ghost docs for more information:

> **[Ghost-CLI - A fully loaded tool for installation and configuration](https://ghost.org/docs/ghost-cli/#ssl)**
>
> The best way to install, manage, and update your site locally or when self-hosting Ghost. A full guide for our advanced CLI tool.

You can also search the Forum for this issue to see how others have solved the problem!
