I'm working on my thesis now and noticed I get extra spaces in my footnotes, I suppose because of long web links. I've tried to fix this with url and hyperref packages, it didn't work.
Here is my code:
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{multirow}
\usepackage[left= 3 cm,right= 2.5 cm,top= 2 cm,bottom=2 cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage{selinput}
\usepackage{array,booktabs,tabularx}
\usepackage{url}
\usepackage{hyperref}
\makeatletter
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother
Here is what I get in my footnotes:

As you see last footnote has a huge space between words and I get same thing on several pages. I hope somebody can help me!
xurlpackage, which allows URLs to be broken everywhere and not just at points where it looks nice. That should drastically reduce issues with overfull/undefull boxes, but may lead to some URL breaks that don't look as pretty (words in URLs may be split in the middle without regard for syllables and usual hyphenation points). – moewe May 08 '20 at 14:28natbiborbiblatex? – moewe May 08 '20 at 14:29\hspace{.3em}with no stretch. If effective (not tested) this would still result in an "underfull" message, and with luck a short first line. Not ideal, but better looking. There's a long discussion about breaking urls in this question: Forcing linebreaks in \url – barbara beeton May 08 '20 at 20:00