Buy a guitar at a guitar shop, or buy online?
Perhaps you've heard the call from local businesses in your area, "Support your local business." The greatest advantage that you have in doing just so with a guitar shop is that you can get a ton of perks that you won't get from buying a guitar online.
The most obvious perk you get is a reassurance that returning the guitar will not be that big of a hassle. Just drive back to the guitar store, and ask for a refund. It's never a bad idea to chck out the store policy on returning guitars. How long of a period do you have? Will you get a refund of cash/credit card, or will you get store credit? Get this in writing.
The less obvious perk is getting the guitar set up for you. I've rarely bought a guitar from a guitar shop without them offering to set up the guitar for me. They know that online guitar sales businesses can't really set up a guitar just for you, and in doing so they will likely earn repeat business. I can't blame them. Honestly, I have my favorite guitar shops that I go to because their customer service can't be beat.
The other extreme advantage of going to a guitar shop is that the people who work there are full of information that they want to share with you. Ask them any question about guitars, and they will share. If you are a naturally curious person, you'll find that talking to guitar shop employees to be great fun.
The disadvantages, I believe, are far outweighed by the advantages. Since online guitar dealers tend to have massive warehouses where they can store a ton of guitars, amps, accessories, and because most of them try to have a worldwide presence without having a storefront, their prices are so much cheaper than local guitar shops. This one advantage cannot possibly compete with the experience of a guitar shop, a helpful employee, and a new guitar that since you held it you fell in love with it.
My recommendation if you are a beginner to guitar? Buy a guitar from a guitar shop, and skip buying online altogether, at least for your first guitar.