It's a race of legendary proportions. A whopping 238 competitors are scrambling to win what would amount to the equivalent of a corporate golden goose: HQ2.

HQ2, the second of Amazon's much-heralded headquarters, promises everything from local perks to global recognition -- not to mention an influx of top talent. By all accounts, bids came fast and furious from U.S. and Canadian cities, each vying to birth Jeff Bezos' second big, beautiful, $5 billion baby.

But is this expansion going to be the boom everyone expects it to be, or will it end in an expensive flop? And what can other companies do to ensure their own expansions make the grade?

Priced to Move

Although the public might have been taken aback by the announcement to open a megalithic Amazon outside of Seattle, insiders have known for years of the company's plans.

Simply put, the titanic organization was feeling the pains of almost shocking growth. Factor in the Washington city's pricey real estate and snarled roadways, and the decision to look outside the state was obvious.

While Amazon's expansion is likely to be a resounding success, previous attempted expansions have seriously backfired for other big-name companies. Target, for example, was forced to close 133 Canadian stores after a quick and costly expansion failed to reach profit expectations.

So how can your company avoid repeating Target's painful experience? Take these five steps before executing those expansion plans:

1. Make sure the expansion's actually necessary to growing your bottom line.

Feeling a little like a crib-bound toddler who needs a "big kid" bed? Are workers practically sitting on top of each other? Have you been forced to carve out niches, including former broom closets, to accommodate your team, supplies, machinery, or products?

Unless you want to stand still, you have to think like Amazon and get yourself some breathing room. Otherwise, you won't be able to sustain your current trajectory and will stunt organic growth.

2. Get definitive numbers for the demand before moving.

PopFoam, the leading maker of injection molded EVA closed-cell foam, is no stranger to expansion. The company started production in the U.S., then expanded overseas when its customer base went global, because its team knew they couldn't be responsive or offer fast delivery without adding more manufacturing facilities.

Now, with demand in the U.S. growing even more, the company has formed a stateside manufacturing partnership, giving it locations in three countries to match its increasing production needs.

Burgeoning demand is a good problem to have, but if customers are clamoring for more of your product than you're able to produce, you'll eventually be seen as unreliable if you fail to expand to cover the need.

Popfoam had the benefit of knowing the U.S. market already existed, as well as the demand that was expected from an American customer base.

3. Assess the cultural impact of your offering in a foreign market.

If your industry is relatively new, there's a chance that your offering could enjoy free rein in an outside market that isn't filled with competitors. If that's the case, you may be primed for an explosive expansion by opening an office in a foreign country.

Before taking the leap on this one, cover yourself with due diligence. As Joseph F. Paris, Jr., chairman of business consulting firm XONITEK, noted, "First, make sure your customers exist. Is there a need for your offering? Are they inclined to purchase? Don't think that they might -- know that they will."

Cultural differences may mean that customers in other nations don't feel the same need for your offering, and the last thing you want to do is find out your target audience is a mirage.

4. Keep the home base happy.

Companies rife with turnover need to think twice before expanding. After all, a shift in working environment can lead to job anxiety, stress, and other reasons for employees to jump ship.

Before publicly announcing an expansion, outline the roles your staff will have to play. Consider emerging demands, and prepare workers to succeed rather than flounder in the new arrangement.

5. Get your green lined up first.

Wise Acre Frozen Treats experienced massive growth in its first two years -- both in its production and in its operating expenses. In order to cover these costs, the company started spending promised investments before it had the cash in hand. When the 2008 financial crisis hit and those dollars never arrived, the company was forced into bankruptcy.

The majority of businesses under three years old risk losing momentum and security by expanding to extra locations. Typically, it takes 36 months at least to get operations flowing smoothly and in a controlled fashion.

Unless your loyal customer base is absolutely knocking down your doors with orders and you're swamped in business, it's best to wait on expanding until you're out of the early period of startup growth.

You might not have the clout of an Amazon yet, but that's no reason not to scale your organization to the size it needs to be. If that includes opening doors beyond your headquarters, follow these five steps to ensure your expansion will be a success story and not a cautionary tale.