It is, and doing so is a sensible way to safeguard your brand. Many businesses use a domain that mirrors their name, as with Amazon.com and Amazon.com Inc., and that kind of domain name is eligible for trademark registration. Once your domain is registered as a trademark, it is protected, and other parties are blocked from taking similar domain names. Think of it as a business name registration applied to the domain level, an area overseen by bodies such as ICANN.
Where to file
Register your trademark in each country that matches your domain's registration, so your rights cover those specific markets. For example, file in France for your-domain-name.fr, or in China for your-domain-name.cn.