You have clicked "Accept all cookies" a thousand times without reading a word. But if you run a website, a blog, or even a small online store in India, you are on the other side of that banner now — and that little popup is no longer just good manners. Under India's data protection law, it is a legal requirement.
The good news: setting up a proper cookie consent banner is a 5-minute job once you know what it must include. This guide explains the rules in plain language and shows you how to generate a ready-to-use banner for free.
Try it free → Cookie Consent Generator
Why your website needs a cookie consent banner
Cookies are small files your website stores on a visitor's browser. Some are harmless (remembering a shopping cart). But many — analytics cookies, ad tracking, social media pixels — collect personal data about visitors: their location, device, browsing behaviour, and interests.
India's Digital Personal Data Protection (DPDP) Act, 2023 says that before a business processes someone's personal data, it must get their free, specific, informed, and unconditional consent through a clear affirmative action. Tracking cookies fall squarely under this. That is what the consent banner is for: it asks visitors for permission before your site drops tracking cookies on their device.
If your site serves European visitors too, the EU's GDPR applies a similar rule. One well-built banner can keep you compliant with both.
What Indian law actually requires from your banner
You do not need a law degree to get this right. The DPDP Act's consent rule boils down to these points:
- Consent must come first. Tracking and marketing cookies should not load until the visitor says yes.
- Consent must be informed. Visitors need a clear, simple explanation of what cookies you use and why — no hidden legalese.
- Consent must be a real choice. A banner with only an "OK" button is not real consent. Visitors must be able to decline non-essential cookies.
- Consent must be withdrawable. Visitors should be able to change their mind as easily as they gave consent.
- Strictly necessary cookies are exempt. Cookies your site needs to function (login sessions, security, remembering consent itself) do not need permission — but everything else does.
What your banner must include
A compliant cookie consent banner has five essential parts:
- A plain-language notice. One or two sentences saying your site uses cookies, and what for — e.g. analytics, advertising, or remembering preferences.
- Accept and decline buttons. Both options must be equally easy to click. Pre-ticking "accept" boxes is not allowed.
- A preferences or settings option. Let visitors choose categories — essential, analytics, marketing — instead of forcing all-or-nothing.
- A link to your cookie or privacy policy. The banner is a summary; the full details live in your policy page. Your banner works hand in hand with your privacy policy — if you do not have one yet, you can generate one with the free Privacy Policy Generator.
- A consent record. Your site should remember each visitor's choice (and honour changes later). A good banner tool handles this for you.
How to create a cookie consent banner in 5 minutes
- Open the free tool. Go to the Cookie Consent Generator — no signup needed.
- Enter your site details. Your site name and URL, so the banner and policy text reference your business correctly.
- List your cookies. Tick the categories your site actually uses: essential, analytics (like Google Analytics), advertising, social media embeds. If you are not sure, check your site with a free cookie checker or look at what scripts your site loads.
- Customise the look. Match the banner colours and position to your site, and write the notice text in language your visitors understand.
- Copy the code to your site. Paste the generated snippet into your website's header (or via your CMS plugin/theme settings). The banner appears for new visitors, and choices are remembered.
5 mistakes to avoid
- No real "decline" option. An "Accept" button with a tiny "learn more" link that leads nowhere is one of the most common violations — and the easiest to spot.
- Pre-ticked boxes. Consent checkboxes must start unticked. A pre-selected "yes" is not consent.
- Loading trackers before consent. If your analytics script fires before the visitor clicks accept, the banner is decoration. Load non-essential scripts only after consent is given.
- Hiding the policy link. The full cookie or privacy policy must be one click away from the banner, not buried in a footer menu.
- Treating the banner as one-and-done. When you add a new tracker (a chat widget, a new ad network), update the banner's cookie list too.
Cookie consent FAQ
Do I need a cookie banner if my site is small?
If your site sets any non-essential cookie — Google Analytics, ad pixels, embedded YouTube videos, social share buttons — then yes, size does not matter. A personal blog with analytics is covered just like a large store.
Is a simple "We use cookies — OK" popup enough?
No. The DPDP Act requires informed consent, which means visitors need to know what the cookies do and get a genuine choice. A bare "OK" button does not meet that bar.
What about cookies that are strictly necessary?
Essential cookies — the ones your site cannot function without, like login sessions and security — do not require consent. But analytics and advertising cookies are never "essential," no matter how useful they are to you.
How often should visitors see the banner again?
Once a visitor makes a choice, remember it. Show the banner again only if your cookie usage changes materially or the visitor clears their cookies. Always provide a way to change the choice later, such as a "Cookie settings" link in the footer.
A compliant banner is not about scaring visitors away — sites that explain their cookies honestly tend to earn more trust, and trust converts.
The bottom line
A cookie consent banner is a small piece of code that carries real legal weight in India. Get the five essentials right — clear notice, real choice, preferences, policy link, and consent records — and you are covered. Skip them, and you are exposed the moment someone complains.
It takes five minutes with the right tool. And if you are a freelancer building sites for clients, a proper banner (along with documents like a freelancer contract) is exactly the kind of professional detail that makes clients pay on time.
Try it free → Cookie Consent Generator