Duplicate, Google chose different canonical than user render issus fixed
This commit is contained in:
parent
5b6821cce9
commit
d1e8cf4bd0
@ -6,7 +6,8 @@ const ConsenHead = ({ title, description }) => {
|
|||||||
|
|
||||||
const siteUrl = "https://metatroncubesolutions.com";
|
const siteUrl = "https://metatroncubesolutions.com";
|
||||||
const cleanPath = router.asPath.split("?")[0];
|
const cleanPath = router.asPath.split("?")[0];
|
||||||
const canonicalUrl = `${siteUrl}${cleanPath === "/" ? "" : cleanPath}`;
|
// Ensure the URL always ends with a / because trailingSlash: true is set in next.config.js
|
||||||
|
const canonicalUrl = `${siteUrl}${cleanPath === "/" ? "/" : (cleanPath.endsWith("/") ? cleanPath : `${cleanPath}/`)}`;
|
||||||
|
|
||||||
const defaultTitle = "Metatroncube: Leaders in Web & Mobile Dev, SEO, Digital Marketing";
|
const defaultTitle = "Metatroncube: Leaders in Web & Mobile Dev, SEO, Digital Marketing";
|
||||||
const defaultDescription =
|
const defaultDescription =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user