Score:1

2 domains configured on digital ocean, only 1 works with direct browser access using Apache2

in flag

I have a droplet on digital ocean which was initially configured with only one domain (andrey.dev.br), it worked right out of the box after installing either Apache or Nginx without any extra configuration.

after some time I configured a second domain (raphaelvieira.dev) on the same droplet via digital ocean admin panel, the first weird behavior was that every time I tried to access the domain raphaelvieira.dev on the browser (chrome, firefox, etc), the browser automatically redirected it to https://raphaelvieira.dev, which is odd because I don't have a HTTPS configured on apache, but it works if I access it via terminal with curl, example:

curl htttp://raphaelvieira.dev 

after some unsuccessful tries, I decided to add virtual hosts for the two domains, following this tutorial, the first one (andrey.dev.br) continued to work fine via browser access or curl, but the raphaelvieira.dev, when accessed from browser, started to return "www.raphaelvieira.dev took too long to respond.", but kept working via curl on terminal.

the raphaelviera.dev domain is registered on google domains.

why is this happening?

Thiago Dias avatar
in flag
i installed https on apache and now the raphaelvieira.dev is working, seems like .dev domains must have https enabled, at least for direct browser access
Patrick Mevzek avatar
cn flag
"why is this happening?" When you bought your `.dev` domains the registrar had the obligation to show you a message (this is required by the registry, Google) explaining that `.dev` domains requires HTTPS as the whole TLD has been added to the HSTS preloading list.
Score:1
za flag

This is a known issue.

TLD .dev is forced to use HSTS, which means without SSL is not possible

Regarding https://get.dev/#get-started as Reference:

Your security is our priority. The .dev top-level domain is included on the HSTS preload list, making HTTPS required on all connections to .dev websites and pages without needing individual HSTS registration or configuration. Security is built in.

So Enable and force SSL and also forgot any http on this as it will be useless on this kind of TLD.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.