Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Is it possible to insert a tag URL as a base URL for Posts?

  • #5808
    Avatar photo[anonymous]

    Is it possible to customize Publii URL structure slightly?

    From something like this:

    website.com/post-name

    to this

    website.com/cars/post-name

    “cars” being the name/URL of the tag.

    I’ve found that using htaccess has helped to customize tag URLs with a rewrite rule. But, for single posts, I think we would have to do a custom rewrite rule for each post. The main purpose behind this is to retain URLs that we currently have on WordPress, and migrate to  Publii.

    Thanks,

    #5809
    Avatar photo[anonymous]

    There is another option as far as I know, which requires installing Publii in subdirectories for each previous Tag-Base URL that we had before.

    This isn’t all that difficult. Just duplicating the same Publii theme into each Tag that we have. But, I figured it’s best to ask here first to see if anyone else has another method.

    As I mentioned previously, htaccess rewrites work well for the tag URLs themselves, but for the single posts, I wouldn’t want to have to do a rewrite for each post, unless I really had to.

    #5810
    Avatar photo[anonymous]
    #5811
    Avatar photoBob

    Publii generates post URLs without tag name, as this is a tag, not a category; nevertheless, from the SEO point of view, there seems to be no category or tag name in the post URL, this way it works for example on CSS Tricks, MOZ.com or SmashingMagazine

    More about how URLs in Publii works you can find here: https://getpublii.com/dev/how-urls-in-publii-works/#how-urls-in-publii-works

    #5812
    Avatar photo[anonymous]

    Hmm.

    I’m curious how I will be able to move a website like this to Publii without redirects on every URL of the site. 🤔

    I see what you mean about the difference between categories and tags.

    Categories
    https://cardinalhomedesigns.com/stagings/staging-small-space/
    https://cardinalhomedesigns.com/blog/therapists-look-to-cardinal-designs/

    And, here are Tags, but tags are not part of the base URLs for the posts, they just behave like tags, or collections.

    https://cardinalhomedesigns.com/galleries/luxury/

    Hmmm. So, there is an option to avoid tag-base URLs, but this requires .html on the URLs, so a redirect is unavoidable in this case.

    From what I see here, is to install a clone of the site into subdirectories. It’s a little cumbersome and losing some features for grabbing post links and feeding posts from these subdirectories into something like the home page, or root directory install.

    It would be perfect if  I can remove the custom tag base URL, allowing the tag to display, but without the .html extension.

    So, what would you suggest is the best method to retain URLs for a migration like this? I’m afraid that too many redirects will cause too many negative side effects on SEO.

    I guess I  could run clone sites, and install them in subdirectories, but lose some of the bells and whistles of how they can interact together.

    I could only pray for a solution here for these circumstances. Any ideas?

    Thanks Bob

    #5813
    Avatar photoBob

    The .html extension has nothing to do with it, you can disable it by enabling SEO-friendly URLs.
    After migration, your URLs will change but this is not a problem, just skillfully use bulk redirects from the tag or categories pages.
    There is no other way.

    #5814
    Avatar photo[anonymous]
    This reply has been marked as private.
    #5815
    Avatar photo[anonymous]
    This reply has been marked as private.
    #5816
    Avatar photo[anonymous]
    This reply has been marked as private.
    #5817
    Avatar photo[anonymous]
    This reply has been marked as private.
    #5818
    Avatar photo[anonymous]
    This reply has been marked as private.
    #5819
    Avatar photo[anonymous]

    Is it too much to ask for Publii to have an instruction set that permits posts to have their folders placed into a tag folder?

    Publii is based on flat files and natural architecture, yet doesn’t allow one to logically order things?

    If  I post a Blog article on any website… let’s say

    <code class=”c-mrkdwn__code” data-stringify-type=”code”>/how-to-skin-a-cat/

    Then, wouldn’t you prefer to have it like this?
    <code class=”c-mrkdwn__code” data-stringify-type=”code”>/blog/how-to-skin-a-cat/

    With Publii, you require users to do another subdirectory install, so the native apps are unable to grab those in the editors.
    Maybe, you can create a simple “LINK” between projects in Publii that allows them to grab each-others posts? Or share a single theme? I’m okay with theme cloning.

    But, if you expect any average WordPress website to migrate to Publii, to nuke all of their SEO by doing bulk redirects, then you are missing out on 90% of your potential customers. These are just the hard facts.

    It is funny because I can download Publii created site files, open it in Dreamweaver, which has visual editing templates for header, footer, sidebars, navbars,  everything and anything that I want to become a template, and organize links and folders 100% to accuracy, any which way that I desire. But, no point in doing it this way.

    It’s a shame because I think Publii has the potential to replace 50% or more of WP websites, but it never will until this fundamental issue of link architecture is met.

    How about just giving Publii some intelligent URL  control as shown here in the screenshot. Surely, there is a solution and not  “no other way”.

    #5821
    Avatar photo[anonymous]

    https://moz.com/blog/heres-how-to-keep-301-redirects-from-ruining-your-seo

    this is a really simple issue, very old, and will never change because a URL is a URL.

    Too many people think they know Search Engine Optimization. This is too easy to lie about.

    I’ve been doing this before Google existed. So, I know my stuff on this.

    301s are for emergency use, ONLY.

    https://en.wikipedia.org/wiki/HTTP_301

    June, 1999
    https://datatracker.ietf.org/doc/html/rfc2616#section-10.3.2

    https://en.wikipedia.org/wiki/Canonical_link_element#:~:text=A%20canonical%20link%20element%20is,went%20live%20in%20April%202012.
    went live in April 2012

    Canonical links are dangerous.

    People use them, even worse, plugins like Yoast force them on by default.

    This is like telling a robot, “we promise this URL will be here forever, and never change”

    Then, the worst combination is this:

    URL contains a canonical link tag,

    URL changes and gets a 301.

    You are telling the robot a promise, then breaking the promise.

    This hurts “trust”.

    The robot now doesn’t trust you anymore.

    if a URL has no canonical, and it changes, the damages are much much less.

    Google invented canonical links, only for duplicate URLs. This only occurs on CMSs like Shopify, where a URL can appear twice with different base URLs that are shown only due to how they navigated to the page.
    If a product belongs in more than one category, it must choose only one. Otherwise, the same page exists twice.

    This is why Tags are better in this case because tags are merely queried anywhere.

    Publii NEEDS categories and link architecture control.

    Otherwise, you are closing yourself off from 95% of customers who want to use your CMS.

    PHP CMSs are dying out, faster each day. While they are good for Forums, and online login portals, static sites are the future, and people should have known better about the consequences of investing efforts into something that simply creates more work than required, and even worse, an excessive amount of  URLs which really do nothing for a website’s indexing. #1 problem with WordPress users — abuse of categories and tags.

    #5834
    Avatar photo[anonymous]

    Cool, so, I guess you should warn some of your new users that they will lose all of their Facebook likes on their URLs. Right?

    Some of my clients have over 1.5 million likes. They would probably lose their minds for losing all of that.

    Publii is ignorant to SEO?

    I can hire my own devs to build this properly. But, I doubt I will share that for free depending on the cost to make it work correctly.

    Publii should have thought about handling folder structures and link architecture.

    There are a  lot of people, even ones that work at Google that lie about SEO and this redirect topic. Of course, redirects break your trust with the rest of the world. Period.

    #5835
    Avatar photoBob

    Please don’t spam our forum.

    The URL structure in the Publii is thought out and works as optimally as possible for SEO purposes. If you don’t like the way it works, don’t use Publii and change it to a more optimal CMS for your needs.