子域名在Google中显示代替主域名[关闭]

My main domain is polishwords.com.pl, but i noticed in Google some links are directed to:

mail.polishwords.com.pl

as you can see here:

Subdomain not main domain

I don't know whether it's PHP code or htaccess or DNS records. What can be the cause of this and how to fix it?

I don't know what can be the cause of this, but you can fix it with this .htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^polishwords\.com\.pl$ [NC]
RewriteRule ^ http://polishwords.com.pl%{REQUEST_URI} [NE,L,R=301] 

That redirects all subdomains to the main domain