Dario Posted April 23, 2023 Share Posted April 23, 2023 Hello, I am doing tasks to improve the indexing of whmcs in search engines. When I look at the source code of my pages, I can see that the title tag appears duplicated, the first title is correct, according to the configuration set in the lang/overrides/english.php file, but the second one appears as the name of the page , in this case: Homepage How to prevent the title tag from appearing duplicate? header.tpl <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Quality of Web Services</title> <meta name="keywords" content="web hosting, domain names" /> <meta name="description" content="Web Services from people to the world" /> <title>Homepage</title> <!-- Styling --> <link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600|Raleway:400,700" rel="stylesheet"> <link href="/templates/six/css/all.min.css?v=cc3457" rel="stylesheet"> <link href="/assets/css/fontawesome-all.min.css" rel="stylesheet"> <link href="/templates/six/css/custom.css" rel="stylesheet"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> /lang/overrides/english.php $_LANG['title_homepage'] = "Quality of Web Services"; $_LANG['meta_description_homepage'] = "Web Services from people to the world"; 0 Quote Link to comment Share on other sites More sharing options...
andrezzz Posted May 1, 2023 Share Posted May 1, 2023 Hello, If that's the header.tpl, why have already the Title with the language? 0 Quote Link to comment Share on other sites More sharing options...
Dario Posted May 10, 2023 Author Share Posted May 10, 2023 Hi there, The title you see, meta keywords and meta description, was added by me manually in: /lang/overrides/english.php since whmcs, by default it only adds <title>Homepage</title>, as you see in my description above and that is what I don't want to appear: <title>Homepage</title> because it is already customized by me. 0 Quote Link to comment Share on other sites More sharing options...
andrezzz Posted May 11, 2023 Share Posted May 11, 2023 Hi, Test this code here, since you can't have two titles and I didn't see a translation in that: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>{$_LANG.title_homepage}</title> <meta name="keywords" content="{$_LANG.title_keywords}" /> <meta name="description" content="{$_LANG.meta_description_homepage}" /> <!-- Styling --> <link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600|Raleway:400,700" rel="stylesheet"> <link href="/templates/six/css/all.min.css?v=cc3457" rel="stylesheet"> <link href="/assets/css/fontawesome-all.min.css" rel="stylesheet"> <link href="/templates/six/css/custom.css" rel="stylesheet"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> If this still doesn't work, maybe you have some Hook or Addon, add that title element because WHMCS itself doesn't add it. 0 Quote Link to comment Share on other sites More sharing options...
Dario Posted May 11, 2023 Author Share Posted May 11, 2023 Hi. There is a wrong configuration, but I don't know where the problem is. I will continue investigating. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted May 13, 2023 Share Posted May 13, 2023 The first title comes from your $_LANG while the second, judging from its particular location, should come from {$headoutput}. In this variable WHMCS puts all content returned in ClientAreaHeadOutput. In other word on your system there is probably an action hook responsibile for title duplication. You should look inside includes/hooks and also make sure no module is returning title tag via action hook. p.s. My 2 cent. Don't waste time with SEO in WHMCS. It is not worth the effort. Real-life improvements are laughable and non-existent. All you get in return is probably a SEO tool that scores you higher and higher but this doesn't automatically translate into better indexing. You need way more than just a titles and meta tags to get something relevant not to mention WHMCS multi-language is session-based hence search engines will never index you site in other languages. Lastly what's the point of crafting titles and metas when WHMCS is a generator of duplicate contents? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.