Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How do I…?
  3. » sitemap

#1 2021-07-11 07:45:53

Gallex
Member
Registered: 2006-10-08
Posts: 1,304

sitemap

hi!

i use this code for sitemap

<txp:header value="application/xml; charset=utf-8" />
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc><txp:site_url /></loc></url>
<txp:section_list exclude="sitemap,various,test" break="">
<url><loc><txp:site_url /><txp:section />/</loc></url>
</txp:section_list>
<txp:article_custom section="meist,tooted" break="url" wraptag="" limit="9999">
<loc><txp:permlink /></loc>
<lastmod><txp:modified format="%Y-%m-%dT%H:%M:%SZ" /></lastmod>
</txp:article_custom>
</urlset>

it worked well until i upgraded site to 4.8.7.
now, site can’t be reached

what could be reason?

Offline

#2 2021-07-11 08:02:48

etc
Developer
Registered: 2010-11-11
Posts: 5,130
Website GitHub

Re: sitemap

Hi,

in 4.8.5 and above, you need to set name in <txp:header />:

<txp:header name="Content-Type" value="application/xml; charset=utf-8" />

Offline

#3 2021-07-11 08:14:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,060
Website GitHub Mastodon Twitter

Re: sitemap

Hi Gallex,

Here’s how we do it.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2021-07-11 09:20:29

Gallex
Member
Registered: 2006-10-08
Posts: 1,304

Re: sitemap

etc wrote #330972:

Hi,

in 4.8.5 and above, you need to set name in <txp:header />:

<txp:header name="Content-Type" value="application/xml; charset=utf-8" />...

thank you!

Offline

#5 2021-07-11 09:23:46

Gallex
Member
Registered: 2006-10-08
Posts: 1,304

Re: sitemap

colak wrote #330976:

Hi Gallex,

Here’s how we do it.

what are the advantages of your solution?
to me it’s just too complicated…

Last edited by Gallex (2021-07-11 09:24:34)

Offline

#6 2021-07-11 14:01:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,060
Website GitHub Mastodon Twitter

Re: sitemap

I had do add the category urls as <txp:category_list /> returns messy urls for me. Delete that part, and the rest of the syntax is very short.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#7 2023-10-27 17:45:54

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,087
Website Mastodon

Re: sitemap

colak wrote #330989:

I had do add the category urls as <txp:category_list /> returns messy urls for me. Delete that part, and the rest of the syntax is very short.

I am trying to add a sitemap and use the txp tags suggested in my header. Is there some documentation on that and how to make use of it?

<txp:header name="Content-Type" value="application/xml; charset=utf-8" />
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc><txp:site_url /></loc></url>
<txp:section_list exclude="sitemap,test" break="">
<url><loc><txp:site_url /><txp:section />/</loc></url>
</txp:section_list>
<txp:article_custom section="tdwr,about" break="url" wraptag="" limit="9999">
<loc><txp:permlink /></loc>
<lastmod><txp:modified format="%Y-%m-%dT%H:%M:%SZ" /></lastmod>
</txp:article_custom>
</urlset>

I have a section called tdwr that is not being indexed as far as I can tell. Likewise about. After having that section up for over 2 weeks not one google or duckduckgo search finds my entries in the tdwr section. discouraging.

By the way is there a TxP plug-in that perhaps generates a sitemap?


…. texted postive

Offline

#8 2023-10-27 19:41:49

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: sitemap

You can check the validity of your sitemap using one of the online sitemap checkers such as www.xml-sitemaps.com. If there are problems to resolve, that may be a first step.

But it might simply be that google hasn’t discovered it or deemed it worth indexing yet. If you want to, you can add your property to Google Search Console (https://search.google.com/search-console/about). This is independent of Google Analytics – you don’t have to do that. You’ll need to provide some form of verification such as a file on your web server, an entry in your DNS settings or a meta-tag in the page head to demonstrate you have control of the server. After that you can add your sitemap.xml link and after a while it will show you how much of it has been indexed. I find on small, low-traffic sites, it can sometimes take quite a while.

If you use schema.org structured markup, like Phil has in the basic template, it will also provide feedback on any problems with that. Again, I find it can take a few weeks to verify any modifications/corrections I have made.


TXP Builders – finely-crafted code, design and txp

Offline

#9 2023-10-27 19:43:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: sitemap

bici wrote #335833:

By the way is there a TxP plug-in that perhaps generates a sitemap?

There’s rah_sitemap (downloadable installers can be found under releases on that page).


TXP Builders – finely-crafted code, design and txp

Offline

#10 2023-10-28 02:46:46

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,087
Website Mastodon

Re: sitemap

jakob wrote #335834:

You can check the validity of your sitemap using one of the online sitemap checkers such as www.xml-sitemaps.com. If there are problems to resolve, that may be a first step.

But it might simply be that google hasn’t discovered it or deemed it worth indexing yet. If you want to, you can add your property to Google Search Console (https://search.google.com/search-console/about). This is independent of Google Analytics – you don’t have to do that. You’ll need to provide some form of verification such as a file on your web server, an entry in your DNS settings or a meta-tag in the page head to demonstrate you have control of the server. After that you can add your sitemap.xml link and after a while it will show you how much of it has been indexed. I find on small, low-traffic sites, it can sometimes take quite a while.

If you use schema.org structured markup, like Phil has in the basic template, it will also provide feedback on any problems with that. Again, I find it can take a few weeks to verify any modifications/corrections I have made.

thank-you . I ‘ll keep trying to see if my pithy site eventually gets indexed.
PS even though I have Article URL pattern set as /section/title the google console test reports problem urls such as this one: https://bicilogic.com/index.php?id=45 but when I go to that url and then use the prev/next article links at the bottom of the article and then come back it shows as https://bicilogic.com/article/velo-club-gianfranco-bianchin. Why? Is this a problem that I should be concerned about?


…. texted postive

Offline

#11 2023-10-28 13:00:04

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: sitemap

Now that we know what the site is, it might please you to know that I already see both tdwr and about in Google’s search results:

Screenshot

Do a search for site:bicilogic.com in google and it will show you only search results from that domain.

bici wrote #335836:

Even though I have Article URL pattern set as /section/title the google console test reports problem urls such as this one: https://bicilogic.com/index.php?id=45

As far as I recall messy urls always work, regardless of what you have set. Could it be that in the past you had that link somewhere? I sometimes see ancient links still floating around once a site has been reorganised. In the search console, you can also enter those URLs for removal from the search results if they no longer serve a purpose. Alternatively, you might have some place on your site that refers to it.


TXP Builders – finely-crafted code, design and txp

Offline

#12 2023-10-29 02:21:05

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,087
Website Mastodon

Re: sitemap

jakob wrote #335837:

Now that we know what the site is, it might please you to know that I already see both tdwr and about in Google’s search results:

Screenshot

Yes today that also shows up for me! So I’ll rest easy. I have never cared about this before but since I am doing something to help recognize someone and the history of the tour de white rock I DO wish it to be found! ;-)
thanks all! keep on cycling …


…. texted postive

Offline

  1. Index
  2. » How do I…?
  3. » sitemap

Board footer

Powered by FluxBB