{"id":987,"date":"2018-11-06T18:11:16","date_gmt":"2018-11-06T18:11:16","guid":{"rendered":"http:\/\/www.netexl.com\/blog\/?p=987"},"modified":"2026-04-02T09:43:20","modified_gmt":"2026-04-02T09:43:20","slug":"configure-x-xss-protection-in-asp-net","status":"publish","type":"post","link":"https:\/\/www.netexl.com\/blog\/configure-x-xss-protection-in-asp-net\/","title":{"rendered":"Configure X-XSS-Protection in ASP.NET"},"content":{"rendered":"<p>To enable\u00a0X-XSS-Protection header in IIS add\u00a0following to your site\u2019s Web.config file.<\/p>\n<pre class=\"lang:default decode:true \">&lt;configuration&gt;\r\n    &lt;system.webServer&gt;\r\n        &lt;httpProtocol&gt;\r\n\t\t\t&lt;customHeaders&gt;\r\n\t\t\t\t&lt;add name=\"X-XSS-Protection\" value=\"1; mode=block\" \/&gt;\r\n\t\t\t&lt;\/customHeaders&gt;\r\n        &lt;\/httpProtocol&gt;\r\n    &lt;\/system.webServer&gt;\r\n&lt;\/configuration&gt;<\/pre>\n<p>Read more about X-XSS-Protection header\u00a0<a href=\"https:\/\/www.keycdn.com\/blog\/x-xss-protection\" target=\"_blank\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To enable\u00a0X-XSS-Protection header in IIS add\u00a0following to your site\u2019s Web.config file. &lt;configuration&gt; &lt;system.webServer&gt; &lt;httpProtocol&gt; &lt;customHeaders&gt; &lt;add name=&#8221;X-XSS-Protection&#8221; value=&#8221;1; mode=block&#8221; \/&gt; &lt;\/customHeaders&gt; &lt;\/httpProtocol&gt; &lt;\/system.webServer&gt; &lt;\/configuration&gt; Read more about X-XSS-Protection header\u00a0here.<\/p>\n","protected":false},"author":5,"featured_media":1539,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,14,8],"tags":[],"class_list":["post-987","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net","category-how-to","category-seo"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/comments?post=987"}],"version-history":[{"count":2,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/987\/revisions"}],"predecessor-version":[{"id":990,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/987\/revisions\/990"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media\/1539"}],"wp:attachment":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media?parent=987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/categories?post=987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/tags?post=987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}