Duplicate Meta tags in the title.

  • Updated

When you use the CMS:Metadata server control on templates with <head runat="server"> tags, two <title> appear in the <head> section of the website: one from ASP.NET and one from the server control. 

Create a dummy <title> tag with visible=false. ASP.NET will not create another tag, it will not display the dummy, and it will not have 2 title tags in the <head> section.

For example:

<head runat="server">
<cms:metadata id="cmsMeta" dynamicparameter="id" defaultcontentid="3382" runat="server">
<link href="/include/layout.css" rel="stylesheet" type="text/css"/> 
<link href="/include/text.css" rel="stylesheet" type="text/css" media="screen,print"/> 
<link href="/include/print.css" rel="stylesheet" type="text/css" media="print"/> 
<script src="/include/scripts.js" type="text/javascript"></script> 
<title visible="false">Dummy Tag</title>