How to add Canonical Code to Dynamic Page?

I have issues with google indexing. Google as has marked most of my real estate pages as “Submitted but not indexed as canonical” but i am sure i do not have any duplicate pages on my website and i have redirected all old links to my new pages. one option is to add a Canonical code to these pages individually telling google that this pages are authority, but there are no options to select these pages in wix Dash board as they are dynamic pages. So how do i add a canonical code to these pages?

2 Likes

But Dyanmic Pages would not be treated as canonical pages right?if you setup the SEO for your dynamic pages they would not treat them as different versions of the same page I hope.

That’s exactly my point but what has happened here is when i check the said pages using info:https://www.paramountrealty.co.in/Projects/Chandak-Nishchay the search result shows my home page https://www.paramountrealty.co.in/ I have atleast 5 such pages which google is pointing to my home page.
Whats more confusing is that a few weeks back all these pages were indexed and were working fine so basically i don’t know what to check

Hi,
Can you send us a screenshot of the error message you get? I’m not sure that I fully understand what you were referring.

Thanks,
Tal.

Hi,

Have you found a solution to this?
I’m also trying to find out how to add canonical tags to dynamic page.

Best,
Yair

Hi @avigados ,
Can you please share with us the error message you receive and the site URL so that we can better understand what you were referring?

Thanks

Hi @_tal ,

Thanks for your response,
https://webmastertopink.wixsite.com/activy/product/optoma-hd141x

Thanks for your patience and understanding,
Have a best day,
Yair

@avigados
You should use backticks and insert the link variable this way:

const canonicalTag = `<head><link rel="canonical" href="${link}"/></head>`;

Click here to learn more about this.

Best,
Tal.

@_tal

Unfortunately this did not solve the problem


I tried to find a solution to this problem everywhere.

Appreciate your help,
Yair

@avigados
You haven’t copied the code posted above. You should use backtick and not regular apostrophe ’ ’ .

@_tal

WWOOWWW
:scream:


You are a g-e-n-i-u-s
I did not think that such a small detail changed worlds!

Thank you for your patience and your help
Have a lovely day,
Yair

@_tal

Unfortunately, I do not see the tag in the source code on the live site but on the console it’s there, so I do not know how much it takes for Google, but we’ll check it out soon.

@avigados I don’t know if I am purely stupid here but it seem that you have a HTML Component and you want to insert a tag statement into that HTML Component and then want that head to be found by Google on your pages?

I still believe that you cannot alter or modify the head tag of Dynamic Pages this way. Maybe there would be a workaround using advanced properties of the Router in Wix Code but I don’t know.

But Tal is an expert so I hopa that I am wrong but modifying DOM elements is always hard, forbidden or super tricky in Wix.

I’m sorry, I think that I’ve mis-understood you @avigados .
If you wish to embed code to your header, you can use the Track & Analyze feature . This option is to embed code for your site . I’m afraid that there’s no option to embed HTML code to a specific page.
I hope it’s clearer now.

Tal.

@andreas-kviby

Yeah well I tried with hope. I understand what you’re saying. I’m not an expert so I tried the simple ways. In the end I’ll need an expert programmer for a few things. I’ll look for one at the end of the project.

@_tal

You did’nt, Yes I know, I just had to try anyway. Because I want to insert a tag canonical to dynamic page and with Track & Analyze feature I just can not.

Hello everyone,
I have exactly the same problem, google does not index the majority of my pages, it says ‘Duplicate page: the sent URL has not been selected as canonical URL’

I also use repeaters and dynamic pages, I have probably made a mistake, can you help me please @Tal ?
Site : https://www.petitfairepart.com

attached a screenshot via google search console.

thank you so much

@avigados Hi,
did you succeed? How did you add the code? directly in the database? thank you for your help.

@nelly-pinton Hi,

No, there is no solution right now.
Canonical Tag is currently not available on dynamic page

Best,
Yair

Just wondering if Wix is still not able to allow canonical tags on dynamic pages?? I am searching through all the documentation and can’t find anything.