Step 1: Check All in One SEO Plugin Settings
Most SEO plugins in Osclass have an option to automatically generate canonical URLs or handle custom pages.
Log in to your Osclass Admin Panel.
Navigate to Plugins or Settings related to All in One SEO.
Look for options regarding Canonical URLs. If there is an option to disable auto-generation for custom or plugin-intercepted pages, turn it on.
Step 2: Fix the Canonical Tag via Theme Header (header.php)
If the SEO plugin doesn't have an override setting, you can intercept the canonical generation in your Epsilon theme's header file. You want to explicitly tell Osclass that if the current page is the age warning page, the canonical tag should point back to the homepage
Access your server via FTP or File Manager and go to:
oc-content/themes/your theme/header.php (or wherever your theme's header file is located).
Look for where the canonical link is currently being printed (it usually looks like <link rel="canonical" href="..." /> or is handled by a hook like oc_run_hook('header')).
Wrap or replace the canonical generation with conditional logic. For example:
PHP
<?php
// Check if the current view is the Age Warning plugin page
$file = Params::getParam('file');
$page = Params::getParam('page');
if ($file == 'agewarning/warning.php' || $page == 'custom') {
// Force canonical to point to the clean homepage
echo '<link rel="canonical" href="' . osc_base_url() . '" />' . PHP_EOL;
} else {
// Let Osclass / SEO plugin handle it normally for other pages
// (If your SEO plugin uses a specific function, keep it here, otherwise use default Osclass canonical if available)
if (function_exists('seo_canonical_url')) {
seo_canonical_url();
} else {
echo '<link rel="canonical" href="' . osc_current_url() . '" />' . PHP_EOL;
}
}
?>
Step 3: Verify the Fix
Clear your browser cache and any caching plugins you have active on Osclass.
Visit your website in an incognito/private window (where your age verification cookie isn't set yet so the warning page triggers).
Right-click, select View Page Source, and check the <head> section to confirm it now shows:
<link rel="canonical" href="your homepage link">
Verification Success: You will know this is fixed when your SEO analysis tool no longer flags the age-warning URL as the canonical tag for your homepage.