I'm using Overleaf and I recently noticed that the URL of a footnote gets stretched. This leads to the problem that when I copy the URL from the pdf that LaTeX generates and paste it in a browser, it won't lead anywhere because what I paste is as follows:
https : / / youtu . be / UDHROiqYI5o
So, LaTeX seems to add spaces to URLs around semicolons, slashes, and dots. I suspect that LaTeX tries to justify sentences in a way that avoids creating large white spaces between any two words, but it comes at the cost of broken URL's and I want to see if there's a better way to do justification. How do I prevent LaTeX from adding spaces to URL's?

\raggedrightfor affected footnotes; clearly, unworkable "links" are worse than useless. – barbara beeton Apr 10 '22 at 19:52