Recently (February 2023) I encountered a situation where the Yoast SEO breadcrumb shows IP instead of my domain name.
I have been using AWS Lightsail as the hosting. You may already know that it’s tough to get access to the phpMyAdmin or MySQL Database on AWS. You have to go through PuTTY (3rd party software) to get access to your database. From there, you have to fix the database locally and then transfer it back to AWS. There are lots of belts & whistles you have to tie.
There are valid reasons for hardening this access, especially for security reasons. So I don’t blame them for it.
But if you were using a shared hosting or such as a platform where you have access to cPanel or phpMyAdmin or Database, you can easily run SQL commands to update your database tables to fix the breadcrumbs and other parts of your websites.
So, in this post, I will show you both approaches to fixing Yoast SEO breadcrumbs where you have access to phpMyAdmin and where you don’t have access to it.
And it’s just not limited to fixing the breadcrumbs but also you can fix other parts of your website where it shows the IP address instead of the domain name. Such as the image links or other assets may also contain IP addresses.
Let’s fix it!
How to fix Yoast SEO breadcrumbs where you don’t have access to the phpMyAdmin
If you’re proficient in the command line interface, you can fix/update your database tables using it. I am going to discuss this here because it depends on the platform. For example, the commands and processes will be different based on the platform.
To fix the breadcrumb link issue, install a plugin created by the same team as Yoast. The plugin is called “Yoast Test Helper.”
After you activated it, navigate to “Tools – Yoast Test.” You will find a lot of options on that page.
If you only have breadcrumb issues and if it shows IP instead of the domain name, do not look further! Scroll until you find the “Yoast SEO” and click the “Reset Indexables tables & migrations” as you see in the screenshot below.
This will reset/update the “wp_yoast_indexable” table in your database.
That’s it! This is how you can fix your Yoast SEO breadcrumbs if they show IP instead of the domain.
FYI: Some of you may have got advised to export the backup using “All-in-One WP Migration” and import/restore it to replace the URLs. However, I tried it myself (2 times) but this method did not work.
If you need help with your website, you can contact me to get a free quote.
How to fix Yoast SEO breadcrumb using SQL commands?
This method will require access to phpMyAdmin.
After you are logged in, navigate to the database that is associated with your WordPress website.
Click on the SQL tab and run the following command:
Be sure to replace the IP address (22.345.67.81) and the domain with yours before you hit the “Go” button.
UPDATE wp_yoast_indexable
SET permalink = REPLACE(permalink, '22.345.67.81', 'yourdomain.com');
This will replace all the IP addresses with your domain name. And this is how can fix the Yoast SEO breadcrumbs.
But there is a caveat!
You solved the problem but there are other places where you still have the IP address. To find all the tables that contain the IP, go to the “Search” tab and look for the tables that still contain the IP address. Please see the screenshot below to understand how to find the tables.
And again, be sure to replace the IP address that you see in the above screenshot with your own.
After you hit the go button (3rd step in the screenshot above), it will return all the tables that contain the IP address.
Now use the following command for each table.
UPDATE table_name
SET column_name = REPLACE(column_name, '22.345.67.81', 'yourdomain.com');
You have to update the above command and run until it replaces all IPs on various tables. This way you fixed all the links/paths of your website including images and other parts.
Conclusion
Your SSL is installed for the domain and not for the IP address. So anyone who goes through the IP, web browsers will show a warning to the visitors and the web pages may not load.
Also, Google Search Console will pick the IP address instead of the domain name for the referring pages. I personally found this issue for my own website & fixed it.
There are other problems that may happen by having IPs instead of URLs/domains.
The gist word is we don’t want IP instead of URL or domain. So anyone clicks a link anywhere on our website (no matter if it’s a breadcrumb or something else), we want the visitor to go through the URL. And we don’t want them to be redirected to an IP-based URL that never works.