One can't say automatically if the dot is part of the URL (even though usually not). Simpler is to not finish with a dot.