Is there an easy way to set up the domain on the top level rather than sub.domain.com
www, as in
www.example.org, is a sub-domain. When folks say “top level” they sometimes refer to “bare domains”, or just
example.org (sans anything in front).
You can set up Discourse with bare domains or any sub-domain you want. I’ve done this many times, following the standard installation.