Rich Snippets - sitename in search (canonical website URL) - url

Using the example from Google structured data docs, I've added the Website Microdata to my site.
What bothers me is the description of the url prop:
url = the URL of your official website (required)
Does official website mean the base URL of my website or the URL of the current requested page?
I know only that it is not a good practice to have same canonical URL on two different pages and the above description really confuse me.

For the WebSite type, the value of the url property would be the URL that represents the whole website. This is typically the URL of the homepage.
(And for the WebPage type, it would be the URL of that webpage.)

Related

How detailed should my sitemap be for a multilingual site?

I have a one page website which includes an English main page, and a French Main Page. One can access my website through the following URLs:
ENGLISH VERSION OF MAIN PAGE
www.example.org
www.example.org/index.html
example.org
example.org/index.html
FRENCH VERSION OF MAIN PAGE
www.example.org/fr
www.example.org/fr/index.html
example.org/fr
example.org/fr/index.html
For optimal search engine indexing, should I include all of these URLs in my sitemap (with both http:// and https://)? If not, what would be the set of URLs I should include in my sitemap.xml file?
You should include all unique pages in your sitemap once.
All of the different URLs you listed are just different ways of accessing the same page/content, just like most PHP applications can be accessed via site.org/ or site.org/index.php. Your sitemap should include just one reference to a page.
The best practice is to have one canonical URL per document. And each canonical URL should be added to your sitemap (if you have one).
So in your case you may want to use one URL for the English main page and one URL for the French main page, and redirect (with HTTP status code 301) from the other URLs to the canonical ones. In addition, you can declare the canonical URL with the canonical link relation.
If you need to provide HTTP in addition to HTTPS (instead of enforcing HTTPS), you would of course need to have two URLs per document (one with HTTP, one with HTTPS). But you [should only list one variant in the sitemap](http://www.sitemaps.org/faq.html#faq_http_vs_https "Sitemaps.org FAQ: 'My site has both "http" and "https" versions of URLs. Do I need to list both?'"), and you should only declare one as canonical (ideally the same which you added to the sitemap).
Which URLs to choose can depend on various factors (usability, SEO, your backend, …), but it seems safe to assume that index.html is ballast. You’d have to decide if to use the www subdomain (a common convention) or not. Assuming that you choose to omit it, you could have these canonical URLs:
https://example.org/
https://example.org/fr
And you would redirect the following URLs with 301 to the canonical URLs listed above:
https://example.org/index.html
https://www.example.org/
https://www.example.org/index.html
https://example.org/fr/index.html
https://www.example.org/fr
https://www.example.org/fr/index.html

Need to generate custome url for bit.ly?

Hi I am a web application in ROR and shortening url using bit.ly. whenever i create an url using bit.ly i could custom url like http://bit.ly/19Mk8Oj now i want to remove bit.ly and needs to add my own custom url like ferdy.ly/sdf2323 how to do that?
when i Google about this and found the following url http://support.bitly.com/knowledgebase/articles/76741-how-do-i-set-up-a-custom-short-domain-. now i have a registered domain for this from http://libyanspider.com/m and need help to integrate the custom domain with my bitly account? and my application is a feedback engine wherein we are charging user for subscription so i choose business account and received a mail from bit.ly that per month i need to pay $1995.. is custom domain name in bit.ly will cost this much?
what you want is a url shortener algorithm.
Simple explanation with least efforts:
Have a table that you would store your URLs in for lookup, and the id should be auto-incremented(This is default with AR in Rails), convert the id to base 36 with ruby
6788999.to_s(36) #=> "41ifb"
Then you can have a URL as:
foo.com/41ifb
When the request for the shortened URL hits the controller(which you can basically even use bare Routing for) convert the param to an integer:
"41ifb".to_i(36) #=> 6788999
This is a simple basic URL shortener service

url structure for mobile/desktop site

What are the pros and cons of these url formats for a website that does mobile and desktop content...
mobile.example.com
example.com/mobile
no explicit url, but send back dynamic content based on browser, or querystring variable?
thanks
W3 recommends "When accessing site entry points users should not have to enter a filename as part of the URI. If possible, configure Web sites so that they can be accessed without having to specify a sub-domain as part of the URI."
So m.example.com or example.com/m would be best solution

How to Force Bots/Apps to use your URL Shortener

I've used several Twitter apps and they all seem to shorten URLs using the website's own URL shortener instead of bit.ly or tinyurl.com or something. For instance, Amazon's is amzn.to. Is it that these apps are really keeping up with the most popular sites (Amazon, Dell, ESPN, Microsoft, Google, Apple, etc) or is there a metatag, javascript, or something else that I can add to my web application to have it use a custom URL shortener? We have one that we've used forever as our domain name is over 20 characters in length.
Basically, apps that are supporting bit.ly and other URL shorteners can tell who you are and thus shorten the URL appropriately using a custom domain.

What is HHOJSID URI path parameter used for?

I was testing a site with cookies disabled and I noticed HHOJSID parameter in URL path.
It could be a session ID encoded in URL like jsessionid for J2EE web applications.
I searched Google and found a lot of examples but no technical description.
Since this parameter seems to appear exclusively in URLs for HP's Home and Home Office online store, I suggest it stands for "Home and Home Office Java Session ID".
I'm sure you're right when you say it's a URL-based session ID - it's just that HP have modified its name for their online store.

Resources