• Resolved akashmughal21

    (@akashmughal21)


    Hi,

    I have changed the URLs of some of my posts by editing it and changing slug in Yoast options of the post.

    I am not using any redirection plugin. But my old URLs are 301 Redirecting to new ones.

    For example,

    FROM

    https://templatesfreedownload.com/jitsi-meet/

    TO

    https://templatesfreedownload.com/jitsi-meet-app/

    I don’t have any direction plugin installed. Also, redirection at the server level is no active. Further, I have tried disabling all plugins and nothing resolve the problem.

    In the same support, I find someone saying it’s because of Yoast Free SEO Plugin. So, I deactivate and then delete the Yoast plugin but it also didn’t work. The URLs were still 301 redirecting.

    I have checked the .htaccess file as well. There is not redirection rule set there instead of on the rule set by Really Simple SSL to redirect all http requests to https. Although, I tried with the fresh .htaccess. But it also didn’t work.

    I can’t figure out what is causing it. I also contact my useless hosting support. They were also not able to figure out the issue.

    I just want to figure out what is causing it. As I don’t want to redirect old URLs to the new one and want to show Error 410 for old URLs. So, google can unindexed those.

    Although I tried the Redirection plugin and set Error 410 for old URLs. But it’s not working. I contact their support and they said something is 301 redirecting the URLs.

    Please see the below result:
    https://redirect.li/http/?url=https%3A%2F%2Ftemplatesfreedownload.com%2Fjitsi-meet%2F

    I am hopeful that someone may help me to figure out the issue.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • @akashmughal21

    I’m not clear on why you want to. But add this to the functions.php file in your theme and it should work and you’ll get your 301 :
    remove_action(‘template_redirect’, ‘redirect_canonical’);

    Thread Starter akashmughal21

    (@akashmughal21)

    Hi @corrinarusso

    Unfortunately, it’s not working. I have added the said code to functions.php of my theme. But the old URLs are still 301 redirecting. You can check.

    https://templatesfreedownload.com/jitsi-meet/

    is redirecting to

    https://templatesfreedownload.com/jitsi-meet-app/

    while the code the below code is in functions.php

    remove_action(‘template_redirect’, ‘redirect_canonical’);

    Further, I just want to remove old URLs so it shouldn’t appear in my search console as indexed. So, I want to use 410 so these can be unindexed by google instead of redirection. I don’t have any rank or value to the old URL so it’s useless.

    @akashmughal21

    Hmmm – the codex says this :
    “Will also attempt to find the correct link when a user enters a URL that does not exist based on exact WordPress query. Will instead try to parse the URL or query in an attempt to figure the correct page to go to.”

    https://developer.www.ads-software.com/reference/functions/redirect_canonical/

    Did you purge and delete any cache you may have running?
    SmushIT, Monster?

    Thread Starter akashmughal21

    (@akashmughal21)

    @corrinarusso

    I have purged the W3 total plugin cache and cloudflare cache. Also, cleared the browser cookies. But its not working.

    @akashmughal21

    I’m tapped out of ideas then .
    Did you dump Yoast?

    Thread Starter akashmughal21

    (@akashmughal21)

    Yes, I tried deleting the yoast plugin. But it didn’t worked so I reinstalled it.

    Thread Starter akashmughal21

    (@akashmughal21)

    I just want to remove old URLs from indexing. Even though they keep on redirecting. I just dont wanna see those as indexed. Although I have use the removal feature of search console to stop recrawling but yeah its for 90 days i guess.

    Do you have any other idea to remove urls from google indexing as I can’t show 404 or 410 on these pages due to 301 redirect issue.

    @akashmughal21

    If it were me, at this point, I would download my database, and remove all instances of the old url. The re-insert my database. If you’re not comfortable with that, you could try a serialized search and replace tool like this one :
    https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    Secondly, you could write explicit 404s in your httpd.conf or .htaccess file. So that it 404s before it 301s.
    https://stackoverflow.com/questions/18730683/send-a-404-error-via-htaccess
    https://webmasters.stackexchange.com/questions/42822/how-to-redirect-specific-url-to-404-in-htaccess

    Thread Starter akashmughal21

    (@akashmughal21)

    @corrinarusso

    I am a very beginner and don’t have many skills in coding and all that. So, I am not comfortable with trying databased related things. Anyhow thanks for your cooperation.

    I have tried adding Redirect 404 /jitsi-meet/ in .htaccess. It makes the page show 404 not found error but the error was not loading the theme default 404 ErrorDocument.

    I am just changing my mind to leave things as it is. As nothing working well for my case.

    I was doing all this as I am confused with seeing a lot of URLs in the coverage section of the Search console. That say indexed, not submitted in sitemap.

    So, I was just trying to clear that section although it doesn’t show any error.

    Also, I guess WPOcean theme isn’t offering any default 410 ErrorDocument. So, even at some point I really need to use it. I have to create it myself. Don’t know how I am gonna do that as the Redirection Plugin is also not working to show 404 or 410 for any url.

    Thanks for Your precious comments. Now, I will mark the query as resolved.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Automatic 301 Redirect’ is closed to new replies.