As of 2015, free Xbox Live Gold membership codes are unavailable online. Xbox Live Gold does offer free trial memberships by setting up a new Microsoft account on an Xbox One or Xbox 360 console. The trial is only available by signing up for automatic renewal of the membership.
The Xbox Live Gold free trial is only valid with one gamertag, and only three trial accounts are available per console.
The trial membership is also available when creating a new account online. Once a user has created a Microsoft account, he must sign into the Subscriptions page and select the Gold 1 Month Free Trial option. Next, he must add a credit card and complete the prompts to finish the process.