Does a Favicon Have to Be Square?
In practice, yes. Favicons are displayed in square slots (the tab, the bookmark, the home-screen tile), so a non-square image is either padded with empty space or distorted to fit. The file isn't strictly required to be square, but anything that isn't looks wrong, which is why every icon size is defined as an N×N square. Reduce a wide logo to a square symbol rather than squeezing it.
Square slots, everywhere
Every surface that shows a favicon reserves a square for it. Feed a rectangle into a square and the browser either letterboxes it (your mark shrinks with empty bars around it) or stretches it out of proportion. Neither looks intentional.
That's why the standard sizes are all N×N. Designing the source square from the start means every surface gets exactly what it expects.
Favicon shape FAQ
Does a favicon have to be square?
Effectively yes. It's shown in square slots, so a non-square image is padded or distorted. Make the source square to avoid both.
What if my logo is wide?
Use just the symbol or an initial rather than the full lockup. A wide logo squeezed into a square favicon becomes unreadable.
What aspect ratio should a favicon be?
1:1, a perfect square. Every favicon size, from 16px to 512px, is defined as equal width and height.