Mobile app version of vmapp.org
Login or Join
Sent6035632

: 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

@Sent6035632

Posted in: #GoogleSearchConsole

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sent6035632

1 Comments

Sorted by latest first Latest Oldest Best

 

@Berumen354

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme