Bismarck specifically excluded and alienated Austria from German confederation and unification. The victorious allied powers of WWI forbade unification of Germany and Austria in the post-war treaties. Why the effort from various parties to prevent Austria joining any sort of greater Germany?

by Edmure
bug-hunter

First, during German Unification, for Austria to join would mean either the Austrian-Hungarian Empire had to cede sovereignty to the new German Emperor (i.e. Prussia), or vice versa. It also would increased religious tension (Austria was majority Catholic, Prussia majority Protestant) and cultural tension (the Germany already had a lot of Polish land, now add in Hungary and a large chunk of the Balkans). For more info, see /u/vonadler's answer here on a similar question.

An alternate option would be the Hapsburgs ceding their ancestral lands (and power base) in Austria to the new Germany and keeping the rest of the Empire, which would have collapsed the empire given that they had just had to make major concessions to keep the whole thing going anyway.

As for the Treaty of Versailles, with the collapse of Russia and Austria-Hungary, Germany's eastern border was far safer than ever. Their only true threat was France in the west - and France had a smaller population than Germany. Preventing unification between Austria and Germany was a matter of preventing a nation that was fundamentally the strongest nation on the continent (despite political instability and a near-miss Socialist/Communist revolution) from immediately becoming more powerful - in fact, it would arguably be more powerful at the end of the process than it started. The Allies also knew that there was no certainty about future alliances with Russia (already embroiled in a civil war with Allied intervention) or future help from the US (historically isolationist).

Late Edit: Imagine the worst case scenario for some: unification of Germany and Austria, and both Russia and Greater Germany end up Communist (not out of the question during mid-1919 when negotiations were wrapped up), with France already having a strong Socialist bent.