XF 2.3 Node/Page title dilemma

Anatoliy

Well-known member
The best title for a page about salmon fishing in Oregon would be "Salmon fishing in Oregon". The same applies for other species. So I did so.
Which creates a keyword stuffing overkill on a home page (node list?). What would be the solution?

The best names for nodes in a Category would be 'Salmon', 'Steelhead' etc, however those would be weak page titles.

Please advise.

Снимок экрана 2024-12-23 в 11.27.05.webp
 
Solution
D
In node_list_forum template:
Less:
<h3 class="node-title">
    <xf:if is="$node.node_id == 2">
        <a href="{{ link('forums', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">Steelhead</a>
    <xf:elseif is="$node.node_id == 3"/>
        <a href="{{ link('forums', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">Salmon</a>
    <xf:else/>
        <a href="{{ link('forums', $node) }}" data-xf-init="{{ $descriptionDisplay == 'tooltip' ? 'element-tooltip' : '' }}" data-shortcut="node-description">{$node.title}</a>
    </xf:if>
</h3>
Then you can rename them to whatever you'd like and have the best of both worlds.
I can rename nodes to 'Salmon', 'Steelhead', 'Trout' , etc, which would be the perfect for a node list.
But all pages for those nodes from perfect titles 'SomeSpicie fishing in Oregon' will drop to very week page title 'SomeSpicie'.
 
I would change the URL portion to steelhead-fishing-in-oregon and the title to "Steelhead", then (as I'm unsure there are redirects with URL portion set), make an .htaccess entry to 301 redirect steelhead to steelhead-fishing-in-oregon.
 
I was just about to do it until I saw you using the node URL. You can simply change the title of the node and it not reflect in the URL, and it would also be the new <h1> tag.
probably some template modification would be a solution? something like

Code:
if(nodeID == x){
$title = 'first tile';
}
elseif(nodeID == y)
{
$title = 'second title tile';
}
...
 
If you are concerned try an experiment first.

For example I don't think you need the title to be Steelhead Fishing in Oregon, so check the Google ranking for that scratch term. From where I am it isn't great as half way down page two) So just try changing that one to Steelhead. Then request a reindex, check the search term a couple of weeks later. Or do the experiment of noindxing the category and check back.

There are so many myths around SEO combined with some useful information that trial and error I find the best way.

I would change the URL portion to steelhead-fishing-in-oregon and the title to "Steelhead", then (as I'm unsure there are redirects with URL portion set), make an .htaccess entry to 301 redirect steelhead to steelhead-fishing-in-oregon.

I would do it with route filters if it worried me. Seems to be the simplest way. So URL is different to title,
 
  • Like
Reactions: frm
Test it on dev, but this should get you the desired effect once you rename the URL portion (of just the "steelhead" one as an example):
Code:
RewriteRule ^steelhead/(.*)$ /steelhead-fishing-in-oregon/$1 [L,NC,R=301]
it's already set to this from the creation. I have no problem with urls. It's node/page titles I have a problem with. )
That will be taken care of once you update the Title. No extra work is needed.

The .htaccess would ensure you're passing the prior URL to the new one so you don't lose ranking by changing it.
I would do it with route filters if it worried me.
This also might work, but I have no experience with rerouting a URL portion to a new one. Test this before doing .htaccess redirects as it's a much easier approach if it works.
 
yeah, I saw in another post about 'route filter. handy thing, when one needs to change url.
but I don't need to change url )
Your URL portion is "steelhead", I would change it to "steelhead-fishing-in-oregon", then change the title to "Steelhead".

Just how I'd do it.
 
This also might work, but I have no experience with rerouting a URL

just use the route filter to reroute steelhead/(=find) to steelhead-fishing-oregon/ (replace)

I would prefer that to faffing with htaccess

I usually do this the other way round though, to shorten the URL as I don't think it's particular extra useful having keywords there, but as I said experimenting my prove that it does.
 
Last edited:
  • Like
Reactions: frm
Your URL portion is "steelhead", I would change it to "steelhead-fishing-in-oregon", then change the title to "Steelhead".

Just how I'd do it.
oh, sorry, I got confused and trying to confuse you )
yes, right, I completely forgot that I changed that. My thinking was "keywords Oregon and Fishing are already in url (domain name) so I better to go for shorter node's url and not placing 'fishing' and 'oregon' in node's urls twice.
 
Your TLD (url.com) contains both fishing and oregon, but for an extra descriptor, I'd change it like that as users read left to right when and if they look at the URL in search results.

I'm unsure if it'd have a negative SEO effect because of "stuffing" or if it'd be ignored because it's more specific than the TLD as a main keyword.

There's really only 1 way to tell, unless there's an SEO expert here.
 
holly shmolly! )))
I completely forgot that XF adds a site title to a node title. I just changed node title 'Steelhead Fishing in Oregon' to 'Steelhed' and a page title for the node became 'Steelhead | Oregon Fishing Forum' without any extra move from my side. )

The title of a node in a node list is short and sweet, and the page title is not short and includes all the important keywords.
I'm happy! )

Thank you guys for pushing me!!!
 
Steelhead | Oregon Fishing Forum
You can change this per node with <xf:title>Steelhead Fishing in Oregon</xf:title> conditionals on I believe the template forum_view.

I think there may be an add on for this too, but that's from when I was working with XF 2.1, and can't recall the name to see if it's still maintained.
 
holly shmolly! )))
I completely forgot that XF adds a site title to a node title. I just changed node title 'Steelhead Fishing in Oregon' to 'Steelhed' and a page title for the node became 'Steelhead | Oregon Fishing Forum' without any extra move from my side. )

The title of a node in a node list is short and sweet, and the page title is not short and includes all the important keywords.
I'm happy! )

Thank you guys for pushing me!!!

It's probably worth thinking about the best keywords though. So the site is about fishing for various species in Oregon, but I find it best to lookout SEO from the user POV. I mean how many people would such for the words steelhead fishing in Oregon as opposed what may be a more common type of search phrase/question "where's the best place to catch steelhead in Oregon?"
 
Back
Top Bottom