Warning href="android-app:..."

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
anv2010
Rank II - Novice
Rank II - Novice
Posts: 29
Joined: Wed May 05, 2010 4:41 pm

Warning href="android-app:..."

Post by anv2010 » Mon Oct 02, 2017 2:01 am

Hello Albert,

I'm adding my android app link references to specific pages on my website, using the <link rel="alternate" element as follows:

Code: Select all

<link rel="alternate" href="android-app://com.avcalc.aqua_calc.convert.droid/https/www.aqua-calc.com/one-to-all/" />
In response to the link, CSE HTML validator issues the following warning message:

Code: Select all

12. Warning in line 1 at character 938: The value for "href" is not in a valid or recognizable form such as http://, https://, ftp://, gopher://, nntp://, telnet://, wais://, javascript:, mailto:, news:, etc. Please ensure that it is correct.
Is this a valid warning?

I'm running CSE HTML Validator v17.0403

Thank you,
Alex.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3236
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Warning href="android-app:..."

Post by Albert Wiersch » Mon Oct 02, 2017 9:13 am

Hello,

According to this link it should be OK:
https://moz.com/blog/how-to-get-your-ap ... -by-google

I'm doing some research on this and will get back to you. I'll probably have a new config file for you to use to address these warnings later today.

If you have any other reference links then please post them. My searches don't seem to be coming up with any "good ones" except for the above.

UPDATE: I also found this link:
https://firebase.google.com/docs/app-in ... cheme-urls

Which has this note:
Using custom scheme URLs? Custom scheme URLs continue to be supported, although they are not recommended. You can declare them as rel=alternate elements either in the head of the HTML page or in the sitemap. Associate your site and app in Search Console so Google can crawl your sitemap for App Indexing.

So I would not use them... but I will probably change it so that CSS HTML Validator ignores them just in case they are used.
Image
Albert Wiersch

anv2010
Rank II - Novice
Rank II - Novice
Posts: 29
Joined: Wed May 05, 2010 4:41 pm

Re: Warning href="android-app:..."

Post by anv2010 » Mon Oct 02, 2017 9:37 am

There's one for iOS as well, i.e. for the Apple Apps:

Code: Select all

<link rel="alternate" href="Ios-app://123456/example/hello" />
But, I don't have an Apple App, not yet anyway.I found the above link syntax here: http://searchengineland.com/figz/wp-con ... dexing.pdf
Last edited by anv2010 on Mon Oct 02, 2017 9:45 am, edited 2 times in total.

anv2010
Rank II - Novice
Rank II - Novice
Posts: 29
Joined: Wed May 05, 2010 4:41 pm

Re: Warning href="android-app:..."

Post by anv2010 » Mon Oct 02, 2017 9:44 am

Albert Wiersch wrote:
Mon Oct 02, 2017 9:13 am
...Which has this note:
Using custom scheme URLs? Custom scheme URLs continue to be supported, although they are not recommended. You can declare them as rel=alternate elements either in the head of the HTML page or in the sitemap. Associate your site and app in Search Console so Google can crawl your sitemap for App Indexing.

So I would not use them... but I will probably change it so that CSS HTML Validator ignores them just in case they are used.
It's a bit confusing, is the originally posted <link rel="alternate" valid or not? If not recommended, than what is an alternative? Do you know?

Thank you.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3236
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Warning href="android-app:..."

Post by Albert Wiersch » Mon Oct 02, 2017 11:15 am

This is new to me so I was a bit confused as well. Thanks for the PDF link as that helped.

I'm going to suppress the warning messages for android-app:// and ios-app:// links.

I'm not sure if your link is entirely correct though. In the PDF you sent there are some deep link testing tools that might help.

I see you have "/https/" in your link. I wonder if this should be /http/ like in the examples I've seen, even if your site is https?
Image
Albert Wiersch

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3236
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Warning href="android-app:..."

Post by Albert Wiersch » Mon Oct 02, 2017 11:51 am

This new config file for v17 should eliminate the warning messages you are getting:
https://www.htmlvalidator.com/downloads ... 170cfg.zip

Please see the "readme" file in the above ZIP file for installation instructions.
Image
Albert Wiersch

anv2010
Rank II - Novice
Rank II - Novice
Posts: 29
Joined: Wed May 05, 2010 4:41 pm

Re: Warning href="android-app:..."

Post by anv2010 » Mon Oct 02, 2017 1:26 pm

I'm hesitant to use this not-recommended syntax.

In the link, that you had provided in your first response: https://moz.com/blog/how-to-get-your-ap ... -by-google

-- the author mentions Option 2: Schema.org markup (currently supported on Android only) as follows:

Code: Select all

script type="application/ld+json">
{
 "@context": "<a href="http://schema.org">http://schema.org</a>",
 "@type": "WebPage",
 "@id": "<a href="http://gizmos.com/example">http://gizmos.com/example</a>",
 "potentialAction": {
 "@type": "ViewAction",
 "target": "android-app://com.gizmos.android/http/gizmos.com/example"
 }
}
</script>
In your opinion, should I include the above script into headers of my specific pages, instead of the <link rel="alternate"?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3236
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Warning href="android-app:..."

Post by Albert Wiersch » Mon Oct 02, 2017 2:14 pm

I think I misunderstood the recommendation. It recommends against custom scheme URLs, so I think that means use http like in

Code: Select all

android-app://com.gizmos.android/http/gizmos.com/example
Notice the "/http/" part which specifies http as the scheme, which is not a custom scheme.

Your scheme uses https. I'm not sure if that is considered a "custom scheme" or not since it is not "http".

Unfortunately I don't want to give any further recommendations because my understanding of all this is fairly new and basic. :D

I can only recommend that you study some of the links posted in this thread and try to find some other ones. Sorry I can't be more helpful here but I was able to change the config file to suppress those warnings based on the examples in some of the provided links.
Image
Albert Wiersch

anv2010
Rank II - Novice
Rank II - Novice
Posts: 29
Joined: Wed May 05, 2010 4:41 pm

Re: Warning href="android-app:..."

Post by anv2010 » Mon Oct 02, 2017 5:10 pm

Thank you, Albert!

anv2010
Rank II - Novice
Rank II - Novice
Posts: 29
Joined: Wed May 05, 2010 4:41 pm

Re: Warning href="android-app:..."

Post by anv2010 » Mon Oct 02, 2017 6:48 pm

Albert,

I've decided to go with a safe option of creating an android app pages sitemap, as recommended in that same article, that you had found: https://moz.com/blog/how-to-get-your-ap ... -by-google.

I've just submitted the newly generated sitemap, and Google Webmaster seems to have accepted all my android app links.

Albert, as always, Thank for your invaluable assistance throughout these many years, and for your great product.

I run my website (~167k pages) through your application, after any (no matter how small) change to my HTML layout.

I'm looking forward to your next product upgrade.

Best regards,
Alex.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3236
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Warning href="android-app:..."

Post by Albert Wiersch » Mon Oct 02, 2017 7:47 pm

Hi Alex,

You're very welcome! I'm glad you've found the product so useful!
Image
Albert Wiersch

Post Reply