Problems with domains?

I tried a fresh Trellis/Bedrock install with a domain. I used this in the name of the folder and as the key in the development/wordpress_sites and development/vault.yml files. After vagrant up the site wouldn’t load.

Started over just using .com instead and it just worked.

Is there an issue using (or I suppose any doubled up domain like domains with Trellis and/or Bedrock?


We’ve privately discussed the appropriate fix but are yet to implement.

As all my clients use domains … this is obviously important to me. Appreciate the reply.

I also work with many domains.

Obviously is not a definitive solution, but what I did was to replace line 32 in trellis/lib/plugins/filter/


if len(host.split('.')) > 2:


if len(host.split('.')) > 2 and ( ('.').join(host.split('.')[-2:]) != '' ):

Let me know if that works for you.

I’m not python expert but digging into this problem I found a plugin which might help with this issue.

Thanks I’ll give that a try. But I’m guessing a future update to Trellis could undo that?

Problem is there’s other three-suffix domains (not sure what you call them), I deal with, e.g.

Yeah, sure. That was a quick fix, not so elegant, but let me move forward until a better solution is found.

I replaced this line and then re-provisioned the server. Got a 404 error on the .dev url.

Would I need to destroy the server and start again?

You shouldn’t Simeon. If you do vagrant ssh and look at /etc/nginx/sites-enabled/ config you should see changes reflected.

Got the 404 due to Safari being silly. Fix works fine. Thanks so much!

1 Like