Directory names with a dot (.) in macOS
My solution is to use an underscore. I wanted to have folders like:

domainname.com
 domainname.cc

to store local versions of websites I deploy.

But have settled with underscore instead. That means I don't have to worry about the mac thinking these folders are actually files of some specific type.  If I used .cc, there's a risk the mac would think that folder is a c++ source file :)  So, I'm happy with:

domainname_com
 domainname_cc 

such that I know I don't have to worry about that.