Author: Genx

  • How to write robots.txt to avoid AI bots

    How to write robots.txt to avoid AI bots

    I’ll leave this as a memorandum.

    It seems that you can avoid crawling by AI bots by putting the following in robots.txt. That said, there are apparently some AI bots that ignore robots.txt, so I can’t say for sure. If you really don’t want the AI ​​to patrol your site, the only option is to use the Simple Membership plugin or something to put your content behind a login wall.

    User-agent: Google-Extended
    Disallow: /
    
    User-agent: CCBot
    Disallow: /
    
    User-agent: AdsBot-Google
    Disallow: /
    
    User-agent: anthropic-ai
    Disallow: /
    
    User-agent: ClaudeBot
    Disallow: /
    
    User-agent: Claude-Web
    Disallow: /
    
    User-agent: GPTBot
    Disallow: /
    
    User-agent: ChatGPT-User
    Disallow: /
    
    User-agent: ICC-Crawler
    Disallow: /
    
    User-agent: bingbot
    Disallow: /
    
    User-agent: Applebot-Extended
    Disallow: /
    
    User-agent: Amazonbot
    Disallow: /
    
    User-agent: FacebookBot
    Disallow: /
    
    User-agent: Omgilibot
    Disallow: /
    
    User-agent: omgili
    Disallow: /
    
    User-agent: PerplexityBot
    Disallow: /
    
    User-agent: Perplexity-ai
    Disallow: /
    
    User-agent: cohere-ai
    Disallow: /
    
    User-agent: YouBot
    Disallow: /
  • Why should individuals have a personal website?

    Why should individuals have a personal website?

    Creating a personal website can be a transformative step for individuals, offering numerous benefits across various aspects of personal and professional life. Here are some compelling reasons to consider:

    (more…)
  • [Cocoon] Display a custom taxonomy if the currently displayed custom post type post has a custom taxonomy.

    [Cocoon] Display a custom taxonomy if the currently displayed custom post type post has a custom taxonomy.

    Cocoon uses nesting as a PHP structure, so it won’t work if you just modify single.php. First, copy single.php in the parent theme, place it in the child theme, change the file name to single-custom-post-type-name.php, and edit the following parts of the content. This will separate the behavior for custom post types.

    <?php //Post page content
    cocoon_template_part('tmp/single-contents-Custom-post-type-name'); ?>

    After that, create a folder called tmp in the child theme, duplicate the parent theme’s single-contents.php, place it in the child theme’s tmp folder, name it single-contents-custom-post-type-name.php, edit the following parts of the content. This is also one of the mechanisms to separate the behavior for custom post types.

    <?php //Body template
    cocoon_template_part('tmp/content-Custom-post-type-name') ?>

    After that, copy the parent theme’s content.php, place it in the child theme’s tmp folder, name it content-custom-post-type-name.php, and add the following part anywhere.

    <?php //Custom taxonomy categories/tags below the main text
            $post_type = get_post_type();
            $taxonomies = get_object_taxonomies($post_type, 'objects');
    
            $has_terms = false;
    
            if (!empty($taxonomies)) {
              foreach ($taxonomies as $taxonomy) {
                $terms = get_the_terms(get_the_ID(), $taxonomy->name);
                if ($terms && !is_wp_error($terms)) {
                  $has_terms = true;
                  // Show taxonomy name
                  echo '<h3>' . esc_html($taxonomy->label) . '</h3>';
                  echo '<ul>';
                  foreach ($terms as $term) {
                    $term_link = get_term_link($term);
                    if (!is_wp_error($term_link)) {
                      echo '<li><a href="' . esc_url($term_link) . '">' . esc_html($term->name) . '</a></li>';
                    } else {
                      echo '<li>' . esc_html($term->name) . '</li>';
                    }
                  }
                  echo '</ul>';
                }
              }
            }
            ?>

    By the way, I decided to put the above code directly below the code below.

    <?php //Categories/tags below the main text
            if (is_category_tag_display_position_content_bottom() && is_single()) {
              cocoon_template_part('tmp/categories-tags');
            } ?>
  • How to set your own domain as a username in Bluesky

    How to set your own domain as a username in Bluesky

    1. Log in to the Bluesky app and open the settings screen.
    2. Click “Change handle”.
    3. Select “I have my own domain”
    4. Enter the custom domain name you want to use.
    5. Copy the displayed DNS setting information.
    6. Add the copied information to the domain’s DNS settings:
      • Add as TXT record
      • Enter hostname and target (or value) exactly
    7. After saving your DNS settings, return to the Bluesky app and click “Verify DNS Record.”
    8. If the authentication is successful, you will see the message “Your domain has been verified!”.
    9. Click Save to confirm your changes.
  • Which is better: a blog that can be viewed without logging in or a blog that cannot be viewed without becoming a free member?

    Which is better: a blog that can be viewed without logging in or a blog that cannot be viewed without becoming a free member?

    The choice between a blog that can be viewed without logging in and one that requires users to become free members depends on several factors, including your goals, target audience, and content strategy. Here’s a breakdown of the pros and cons of each approach:

    (more…)
  • Personal blog management: make accidental hits your friend

    Personal blog management: make accidental hits your friend

    Managing a personal blog can be both rewarding and challenging. One interesting aspect of blogging is the occurrence of “accidental hits”—unexpected spikes in traffic due to unforeseen reasons. These can be due to trending topics, search engine algorithms, or even social media shares. Instead of seeing these as mere flukes, you can turn them into opportunities for growth and engagement. Here’s how:

    (more…)
  • If you want to attract customers without using search engines, which is easier: a miscellaneous blog or a specialized blog?

    If you want to attract customers without using search engines, which is easier: a miscellaneous blog or a specialized blog?

    Attracting customers without relying on search engines can be effectively achieved through various channels, and the choice between a miscellaneous blog and a specialized blog plays a crucial role in this strategy. Let’s explore the advantages and challenges of each approach.

    (more…)
  • Should I create accounts by topics on SNS?

    Should I create accounts by topics on SNS?

    Creating accounts by topics on social networking sites (SNS) can be a strategic decision, depending on your goals and audience. Here are some considerations to help you decide:

    (more…)
  • How to connect WordPress to Fediverse?

    How to connect WordPress to Fediverse?

    Use the ActivityPub plugin.

    Additional plugins:

  • Simple Membership and Wordfence Login Security seem to be incompatible. Is there an alternative to the 2FA function?

    Simple Membership and Wordfence Login Security seem to be incompatible. Is there an alternative to the 2FA function?

    If you turn on 2FA in Wordfence Login Security while Simple Membership is turned on, you will not be able to log in. If you are locked out, you can re-enter by renaming the Wordfence Login Security folder using FTP and disabling it.

    If you are using Simple Membership and cannot use Wordfence Login Security but want to use 2FA when logging in, you can use All-In-One Security’s 2FA function (for now). However, All-In-One Security has a lot of functionality overlap with Siteguard WP Plugin which I also have it installed, so be careful when activating them at the same time. (Do not launch the same function from multiple plugins)