Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(SEO) Canonical URLs for Multi-LGSL + userbar.php + charts.php #191

Open
Overclocked-LAN opened this issue Mar 3, 2024 · 0 comments
Open

Comments

@Overclocked-LAN
Copy link

Overclocked-LAN commented Mar 3, 2024

I wouldn't necessarily consider this an issue, because it's not an issue for everyone. It is however a necessary adjustment for those installs that are picky about their web content/SEO. My entire website is indexed by Google except for the obvious secure/private directories/files. I'm getting bombarded by Google Search Console because with having so many servers, and multiple installations of LGSL under the same domain name, that Google can't tell what the difference is between each install because they look the same, as well as each individual server receiving it's own GSC error because every userbar.php or charts.php is exactly the same.

So we can do one of two things for SEO:

Add the following HTML information to index.php, userbar.php and charts.php to make the pages canonical and separate them from each other to a certain degree. This would have to be repeated in each directory for those that are utilizing more than one install of LGSL.

This is for Index.php which already has appropriate metadata/html:

<link rel="canonical" href="https://.....com/servers/index.php"/>


This is for the bottom of userbar.php, which appears over and over and over again on Google, with the same metadata from Index.php because Google can't figure out what the difference is between all userbar.php?ip= or charts.php?ip= pages:

<!DOCTYPE html>
<html>
<head>
<title>PAGE TITLE</title>
<link rel="icon" href="https://................com/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="https://..............com/favicon.ico" type="image/x-icon">
<meta name="description" content="DESCRIPTION" />
<meta name="keywords" content="KEYWORDS" />
<link rel="canonical" href="https://.....com/servers/userbar.php"/>
</head>
<body></body>
</html>


This is for the bottom of charts.php, which appears over and over and over again on Google, with the same metadata from Index.php because Google can't figure out what the difference is between all userbar.php?ip= or charts.php?ip= pages:

<!DOCTYPE html>
<html>
<head>
<title>PAGE TITLE</title>
<link rel="icon" href="https://................com/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="https://..............com/favicon.ico" type="image/x-icon">
<meta name="description" content="DESCRIPTION" />
<meta name="keywords" content="KEYWORDS" />
<link rel="canonical" href="https://.....com/servers/charts.php"/>
</head>
<body></body>
</html>

Of course, we could also edit our robots.txt in the main directory to not index the LGSL directory or pages, but what fun would that be?
You might have addressed this in LGSL7 @tltneon but for right now I must get LGSL 6.2.1 totally "hooked up" so I'm working with what you've given us :)

Hopefully this helps anyone with LGSL wanting to optimize their presence on search engines/fix canonical issues.

tltneon added a commit that referenced this issue Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant