Canonical again,,,

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
pacstar
 
 
Posts: 166
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Canonical again,,,

Post by pacstar »

Hi — I noticed the canonical link tag generated by the software outputs the attributes as
<link href="URL" rel="canonical">.

Google accepts this, but best practice and most validators expect
<link rel="canonical" href="URL">.

Is there a way to control the attribute order, or a workaround to override the canonical tag output?

Also is there a reason the canonical URL does not generate itself for each page? Or can a setting be made to give us the option?

thanks again!
User avatar
Pablo
 
Posts: 24219
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Canonical again,,,

Post by Pablo »

You cannot control the order of attributes. But I doubt that this is important.

If you do not specify the canonical URL in the page properties then it will not be generated and you can add it manually via Page HTML
pacstar
 
 
Posts: 166
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Canonical again,,,

Post by pacstar »

Maybe I worded it incorrectly. I wasn't referring to the order of the tags in the head.

Google and other validators expect:

<link rel="canonical" href="https://URL.com">

WWB creates:

<link href="https://URL.com" rel="canonical" >

It's possible it "may" not matter, I'm just looking at what Google developers, W3 etc show.

I know how to insert the canonical, I was just suggesting if WWB could create and insert the URL from the page itself, it would be helpful and time saving in the majority of cases. Just a suggestion.

Thanks again.
User avatar
BaconFries
 
 
Posts: 6237
Joined: Thu Aug 16, 2007 7:32 pm

Re: Canonical again,,,

Post by BaconFries »

Maybe I worded it incorrectly. I wasn't referring to the order of the tags in the head
I don't think that what Pablo was referring to when he wrote "You cannot control the order of attributes" he was referring to the html attributes like placing rel="canonical first this can't be changed directly in the software to what you wrote.

To be honest it doesn't matter which way it is and why it doesn't matter:
- HTML attribute order is not significant: Browsers and search engine crawlers parse HTML attributes without regard to order.
What matters is that both rel="canonical" and href="URL" are present and correctly formed.
- Search engines like Google will recognize either version as a canonical declaration, as long as the syntax is valid and the URL is absolute (not relative).
pacstar
 
 
Posts: 166
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Canonical again,,,

Post by pacstar »

This is AI recommendation:

"I’ve noticed that when WWB writes the canonical URL and Open Graph URL into the , it automatically inserts a line break inside the value. The page still works, but some SEO tools and social platforms can be picky about formatting and may misread the URL.
Here are two examples of what WWB outputs:

<meta property="og:url" content="https://www.URL.htm
">

<link href="https://www.URL.htm
" rel="canonical">

Since the canonical and OG fields contain actual URLs, they’re more sensitive to social scrapers, so keeping them on a single line helps ensure search engines and social platforms read the URL cleanly and consistently.

It would be great if WWB could keep those URL fields on a single line so the generated HTML is a little cleaner and more standards‑friendly. Everything else in the metadata system works really well."


If those are done the newline in descriptions could be corrects as well just for consistency.

Thanks again,
User avatar
crispy68
 
 
Posts: 3152
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Canonical again,,,

Post by crispy68 »

Are you saying that WB is adding a carriage return in the code shifting some of it to the next line? If so, when I add a canonical, I don't see this when I preview a page. The code is all on 1 line. What are your HTML format settings set to under Tools-->HTML? Even looking at the code on your webpage, i dont see that this is the case. What exactly are you using for validation?
User avatar
BaconFries
 
 
Posts: 6237
Joined: Thu Aug 16, 2007 7:32 pm

Re: Canonical again,,,

Post by BaconFries »

Looks ok to me see the screenshots...
Image

Image
pacstar
 
 
Posts: 166
Joined: Wed Nov 14, 2018 8:49 pm
Contact:

Re: Canonical again,,,

Post by pacstar »

Thanks for checking. I am using view source.

I just realized that adding a "." to the end of the description may be forcing a newline (carriage return). When I remove the period, it moves the "> up to the same line.

I'll need to look back and find the exact page I saw the newline in the canonical and see if I can find it. Then republish again.

It seems to be sporadic from page to page as I keep checking, I wonder if it was resolved in an update?

I'll check more pages and see if it's a PICNIC (Problem In Chair, Not In Computer)

Thans again.
User avatar
BaconFries
 
 
Posts: 6237
Joined: Thu Aug 16, 2007 7:32 pm

Re: Canonical again,,,

Post by BaconFries »

I doubt it has anything to do with the program itself. You yourself have inserted a lot of manually added code etc and this may be the sole cause of this. For the most recent version of the software it is always a good idea to visit the following Download for the latest version even though it may show in your version you have the latest. This is due to Pablo may release a "HotFix" for minor issues and this is generally always at the link given but doest show in your version yet.
User avatar
Pablo
 
Posts: 24219
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Canonical again,,,

Post by Pablo »

I’ve noticed that when WWB writes the canonical URL and Open Graph URL into the , it automatically inserts a line break inside the value. The page still works, but some SEO tools and social platforms can be picky about formatting and may misread the URL.
When you need help, it is always important to share a DEMO project (not the full project!) so we can see what you have done, because the software has thousands of option and millions of possible combinations.
It does not help anyone to blame to software for generating invalid code if you do not give any context
User avatar
crispy68
 
 
Posts: 3152
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Canonical again,,,

Post by crispy68 »

I just realized that adding a "." to the end of the description may be forcing a newline (carriage return). When I remove the period, it moves the "> up to the same line.
This does not happen for me. I would bet you are hitting the return key after entering the text and period which will cause what you see.
Post Reply