Some search engines consider a domain with the subdomain "www" and the domain without "www" as duplicates, which can reduce your website's value or ranking in search results. To avoid this minor cosmetic issue, you can redirect the non-www domain to the www domain using .htaccess.
Place a .htaccess file in the /web directory on your hosting with the following content:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.mydomain\.cz)?$
RewriteRule (.*) https://www.mydomain.cz/$1 [R=301,L]
This code tells the server that if a request is not from the domain www.mydomain.cz, it should redirect the visitor to www.mydomain.cz. This redirection will also handle all aliases associated with this specific hosting.