The answer is YES and NO.
Guitar is an instrument which is not something that comes perfect right out of the box. It needs an initial setup and quality check before it can be played. The inspection procedure is very important as there are sometimes issues with manufacturing that needs to be rectified. Every Guitar will have different properties because its wood after all and it comes from different trees.
Marketplaces like Amazon / Flipkart and others have registered sellers that may or may not be a music instrument store. So the chances that a quality inspection and Guitar Setup happens are extremely low. Now you might disagree saying that they offer a better price. But yet again, its for the quality check reasons. Long story short - You Get what you Pay.
Buying a Guitar online is perfectly alright if its from a trusted music store. A music store generally has walk in customers and in house guitar technicians who repairs and services guitars. This gives you the assurance that your guitar will be checked and setup before dispatch. A music store will also be able to suggest alternates or better brands as per their experience of selling and customer feedback. So even if you are paying a few extra bucks, you are absolutely getting the worth out of it. Its always better to have someone answer the phone and solve your queries than have an automated mail sent to you and followed by countless emails. Another reason to consider is the packaging that the seller is offering. So lets get your guitar home safe!
Concluding the Question, its the matter of where you are buying the Guitar online from. And that would be a website offering