Anyone launching a site eventually asks whether the address should be www.maktab.uz or just maktab.uz. It looks like a matter of taste, but technically these are two different hostnames. The good news is that search engines have no preferred answer. What matters is picking one and applying it consistently.
Where www came from
In the early internet, an organisation ran separate servers for separate services under one domain: mail, ftp and www for web pages. So www began as an ordinary subdomain pointing to the web server. That split is no longer necessary and browsers often hide www, yet in DNS www.maktab.uz is still a separate name that needs its own record.
How search engines see the two
Google and Yandex treat www and non-www as distinct hosts. If both serve the same content without a redirect, the search engine has to guess which is canonical and inbound links get split between them. There is no penalty, but there is confusion, and sometimes the wrong version appears in results. Neither option ranks better, so decide based on technical convenience and branding.
Arguments for each option
A bare domain is shorter and easier to print on ads, business cards and social profiles. For a small business, blog or one-page site it is usually the natural choice: a private school in Samarkand advertising maktab.uz makes it easy for parents to type the address on a phone.
The www version has real technical advantages for larger projects. DNS rules forbid a CNAME at the zone apex alongside the mandatory SOA and NS records, while some cloud platforms and CDNs expect you to connect via CNAME. A www subdomain can take a CNAME freely. Cookies are the second factor: cookies set on the root with a Domain attribute travel to every subdomain, including static asset hosts. Running on www makes it easier to scope them tightly.
Both names must exist in DNS
Whichever you choose, the other must still work, because some visitors always type www and others never do. A typical setup:
maktab.uz. 3600 IN A 203.0.113.25
www.maktab.uz. 3600 IN CNAME maktab.uz.
Check both with dig +short maktab.uz A and dig +short www.maktab.uz.
Enforce the choice with a 301
Redirect the secondary version permanently. On Apache, this .htaccess rule strips www while keeping the path:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
To force www instead:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
On nginx, give the secondary name its own server block containing return 301 https://maktab.uz$request_uri;. Then verify:
curl -sI https://www.maktab.uz/qabul | grep -iE "^(HTTP|location)"
SSL and HSTS
The certificate must include both names, or anyone opening https://www.maktab.uz sees a security warning before the redirect. The Let's Encrypt certificate on sayt.uz hosting normally covers the domain and its www variant; you can confirm this in the certificate details in the cabinet. Be careful with HSTS includeSubDomains: it forces every subdomain onto HTTPS, so make sure each one has a valid certificate first.
Stay consistent inside the site
Canonical tags, the sitemap, internal links and social metadata should all use the chosen version. In WordPress, the Site Address and WordPress Address settings must match it, otherwise you get a redirect loop. In Google Search Console, a Domain property verified through DNS groups www, non-www, HTTP and HTTPS into one report.
In short, the choice does not affect rankings. A short bare domain suits most small and medium sites, while www is more flexible for large projects with many subdomains and CDNs. Just make sure both names resolve, the certificate covers both, and the secondary one 301-redirects to the primary.