How do I build a link from variables?
Since you are building a custom URL, you shouldn't be using url() here, since it automatically appends your values to the siteUrl. Try one of these instead:

&lt;a href="{{ url(section.handle ~ '/types/' ~ entryType.handle) }}"&gt;

-or-

&lt;a href="{{ siteUrl ~ section.handle ~ '/types/' ~ entryType.handle }}"&gt;