XML sites in search results

What is an XML site



An XML site is a site whose pages are simple XML files with the MIME type "text / xml". They contain only unique data for this page.



This XML file specifies a reference to an XSLT template that converts XML to HTML or XHTML in the user's browser.



Problem



For classic html web pages, search engines display the content of the tag as the title title. The description displays pieces of text with found keywords or tag content .meta description



Search engines usually do not execute scripts on the pages they index and, accordingly, do not see the final version of the page after their execution. Accordingly, they do not see the tags titleand metaare inserted by the XSLT template. They index the text that is in the XML document as is.



Decision



Our task is to add tags correctly titleand metain XML to the browser, search engine and mesedzher which sends a link to this page to understand them.



In the same way, you can add other HTML tags for search engines, messengers and even the browser if it suddenly does not execute the XSLT template.



How a page is rendered without tags



For example, we have this XML:



<>
    <> </>
    <> </>
</>


As it appears in the search without the titleand metatags:



  1. XML is shown in one line (Google)

    Title: <><> </><>...

    Description:<><> </><> </></>
  2. Shortcut (duckduckgo.com)

    Title: example.com

    Description:>> ...
  3. Only the content of the tags in the header (startpage.com)

    Header:
  4. The page is not displayed in the search (Yandex)

    I ran the page reindexing several times, but Yandex stubbornly did not like the mime type of the page. Then when I started writing this article, they sent me a vision that they added to the search. But today the page disappeared from the search again.


Insert tags



title meta xml html "http://www.w3.org/1999/xhtml".



:



  1. html .



    <!--     'xh'  xhtml  -->
    < xmlns:xh="http://www.w3.org/1999/xhtml">
        <!--        -->
        <xh:title>      </xh:title>
        <xh:meta name ="description" 
                 content="       "/>
    
        <!--         -->
        <> </>
        <> </>
    </>


    .



  2. .



    <>
        <!--   head     -->
        <head xmlns="http://www.w3.org/1999/xhtml">
            <!--        -->
            <title> </title>
            <meta name="description" content="       "/>
        </head>
    
        <!--    head      -->
        <> </>
        <> </>
    </>


    .



    c title meta description .



    web.archive.org. html "" . XML .



    web.archive.org .



    &lt;&gt;
        <head xmlns="http://www.w3.org/1999/xhtml"><script ...</script>
            <title> </title>
            <meta name="description" content="       "/>
        </head>
        &lt;&gt; &lt;/&gt;
        &lt;&gt; &lt;/&gt;
    &lt;/&gt;


  3. .



    <>
    
        <!--       -->
        <title xmlns="http://www.w3.org/1999/xhtml"> </title>
        <meta xmlns="http://www.w3.org/1999/xhtml" name="description" content="       "/>
    
        <!--        -->
        <> </>
        <> </>
    </>


    .



    .







title meta . .



Links



Page with links to examples: ivan386.github.io/xml-site-index-test/



I created examples today (07/10/2020). We have to wait until the search engines index them.



These pages in Google: site: ivan386.github.io/xml-site-index-test/

These pages in Yandex: site: ivan386.github.io/xml-site-index-test/

These pages in DuckDuckGo: site: ivan386 .github.io / xml-site-index-test /




All Articles