Kentico CMS 6.0 Developer's Guide

Double opt-in

Double opt-in

Previous topic Next topic Mail us feedback on this topic!  

Double opt-in

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

Double opt-in functionality, also referred to as confirmed opt-in, provides an additional security layer to newsletter subscription. It confirms that the entered e-mail address actually exists and prevents users from being unknowingly subscribed to a newsletter by someone else, either intentionally or by mistake.


When double opt-in is disabled for a newsletter, anyone may simply submit an e-mail address for subscription, without any steps being taken to ensure that the address actually belongs to that user. With double opt‑in, new subscribers are not immediately activated and do not receive newsletter issues. Instead, an automatic e‑mail is sent to them, containing an activation link. Upon clicking the link, users are redirected to a special page and their subscription is confirmed.


Enabling double opt-in


To configure a newsletter to use double opt-in, open the CMS Desk -> Tools -> Newsletters interface, edit (Edit) the appropriate newsletter and switch to its Configuration tab. Now check the Enable double opt-in box in the bottom section of properties and set the remaining ones below:


Double opt-in template - selects the template used for the subscription activation e-mails that are sent to users. Only templates of the Double opt-in type may be selected. Please see the Newsletter templates topic to learn about creating templates.

Approval page URL - sets the URL of the page where users can confirm their subscription to the newsletter. The Subscription approval web part must be placed on the specified page to ensure the required functionality. This URL is used by the Activation link field, which is typically inserted into the Double opt-in template. If left empty, the value of the Site Manager -> Settings -> On‑line marketing -> Newsletters -> Newsletter double opt-in approval page URL field is used. If this setting is empty as well, the default system page is used.

Send double opt-in confirmation - if checked, a confirmation e-mail will be sent to users after they successfully activate their subscription.




Click the OK button to confirm any changes. Now any users who subscribe to the newsletter will receive an e-mail similar to the following (depending on the used double opt-in template):




When a user clicks the Confirm the subscription link, they will be redirected to the default ~/CMSModules/Newsletters/CMSPages/SubscriptionApproval.aspx page, where their subscription will be activated and a basic confirmation message will be displayed. The identifier of the exact subscription is passed to the page as a parameter in the query string of the URL in the activation link.


Approval will only be possible for a limited amount of time after the initial subscription (12 hours by default). You can set the length of this time interval for all newsletters through the Site Manager -> Settings -> On‑line marketing -> Newsletters -> Double‑opt in interval setting. If a user does not activate their subscription within the specified number of hours, the link in the confirmation e‑mail will expire, and the user will have to subscribe again.


If you wish to use a custom activation page, simply create a new page on your website according to the specific requirements and place the Subscription approval web part on it. Remember to enter the URL of this page into the Approval page URL property of individual newsletters, or in the Newsletter double opt-in approval page URL field of the website settings in Site Manager -> Settings -> On‑line marketing -> Newsletters to assign the page to all newsletters that do not have an approval page specified.


Alternatively, newsletter administrators may also activate subscriptions manually using the Approve (Approve) action or Reject (Reject) existing ones.




The Subscriber management topic provides more information about this subject.