How to edit meta tags in DotNetNuke

dotnetnuke, html, meta-tags, w3c-validation

Solution

Unfortunately, there is not a straightforward/supported way to remove most of those `meta` tags in DNN. You'll need to do some degree of altering the core code and/or making assumptions that certain IDs will stay the same. For example, you can remove/replace with robots meta tag by putting code like this in the skin:

private void Page_PreRender(object sender, EventArgs e) {
    var metaRobots = Page.FindControl("MetaRobots") as HtmlMeta;
    if (metaRobots != null) {
        metaRobots.Visible = false;
    }
}

Problem

how do you edit tags in the DotNetNuke CMS? it generates lots of meta tags and has an ID element for each meta tag which is not in the w3c recommendations. Ive looked at SEO optimization articles and it says not to have any other meta tags other than for the keywords and name -- is this true? Meta tags when i view the source code: ``` <meta id="MetaKeywords" name="KEYWORDS" content="naruto, fan, forums, DotNetNuke,DNN" /> <meta id="MetaCopyright" name="COPYRIGHT" content="Copyright naruto"/> <meta id="MetaGenerator" name="GENERATOR" content="DotNetNuke " /> <meta id="MetaAuthor" name="AUTHOR" content="naruto" /> <meta name="RESOURCE-TYPE" content="DOCUMENT" /> <meta name="DISTRIBUTION" content="GLOBAL" /> <meta name="REVISIT-AFTER" content="1 DAYS" /> ```

Original source