: Domain name with trailing dot in Webmaster Tools Is it not possible to add a site to Google Webmasters Tools with a trailing dot in the domain name? Like for example, http://example.com./? If
Is it not possible to add a site to Google Webmasters Tools with a trailing dot in the domain name?
Like for example, example.com./?
If I add it, it becomes example.com/, were the trailing dot is removed. And therefore the sitemap fails because 301.
More posts by @Sent6035632
1 Comments
Sorted by latest first Latest Oldest Best
well, turns out that google webmaster tools as well as many other applications doesn't correctly handly FQDN, and just apply a redirect (some browsers) or just ignore it and work with the ambiguous domain name directly (some apps).
to force them to work:
RewriteCond %{HTTP_USER_AGENT} ^.*Googlebot.*$
RewriteCond %{HTTP_HOST} !^example.com$ [NC]
RewriteRule ^(.*) example.com [R=301,NE]
RewriteCond %{HTTP_USER_AGENT} !^.*Googlebot.*$
RewriteCond %{HTTP_HOST} !^example.com.$ [NC]
RewriteRule ^(.*) example.com. [R=301,NE]
Please read closetnoc comment above if you plan to apply this dirty rules in your machine.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.