-
Hello,
I run a WordPress store and want to use Rank Math for redirects. Each YouTube video description contains a link to one product page, but the URLs are long, so I want to create shorter, cleaner links.
I plan to set this up in Rank Math by adding a custom redirect by coming up with the short URL (like “/product-name”) as the source and the full product page URL as the destination. Should I use a 302 or 301 redirect? I guess it’s 302, but I’ve heard that if a 302 is left for too long, Google might treat it like a 301 — does that mean my short link could be seen as permanent and indexed? I don’t think it would be good for my site.
The goal is to shorten the URL to improve CTR.
What’s the best way to set this up so the links look clean, don’t hurt SEO, and work safely long-term?
Thanks!
-
Hello,
We apologize for the issue you’re facing with setting up redirects for your YouTube descriptions. Thank you for raising this concern.
In your case, if you want to create shorter, cleaner links for your product pages, using a 301 redirect is the best option. A 301 redirect indicates that the old URL has been permanently moved to a new location. This is beneficial for SEO as it transfers link equity from the old URL to the new one, ensuring that search engines recognize the new URL as the primary one.
Using a 302 redirect is typically reserved for temporary changes. While it’s true that if a 302 redirect is left in place for an extended period, search engines might treat it as a permanent redirect, it’s not advisable to rely on this behavior. If you intend for your short links to be permanent, a 301 redirect is the way to go.
To set this up in Rank Math:
- Go to Rank Math SEO → Dashboard and enable the Redirections module.
- Navigate to Rank Math SEO → Redirections.
- Click on the Add New button to create a new redirection rule.
- In the Source URL field, enter your short URL (e.g.,
/product-name
). - In the Destination URL field, enter the full product page URL.
- Select 301 Permanent Move in the Redirection Type section.
- Set the status to Activate and click on Add Redirection to save your rule.
By following these steps, your links will look clean and will not hurt your SEO in the long term. If you have any further questions or need assistance with specific URLs, please reply to this ticket, and a human agent from our support team will assist you further.
Sources:
301 vs 302 Redirect: Which One Should You Use? » Rank Math
How to Manage Affiliate Links Using Rank Math » Rank Math
How to Fix the Submitted URL Seems to Be a “Soft 404” Error » Rank MathHello,
Thank you for your patience.
WordPress has a feature to automatically redirect the closest slug to your actual URL,
redirect_canonical()
, so you don’t have to set it up manually.For example, if you share the URL https://mydomain.com/new-product/, it will redirect to the actual URL with a category like https://mydomain.com/some-stuff/new-product/.
Some disable this function to return them to the actual 404 for some reason:
https://typerocket.com/disable-wordpress-automatic-or-random-redirect-guessing-of-404s/Looking forward to helping you.
Hey, thanks for the explanation!
I see how redirect_canonical() works for fixing typos or guessing the correct URL, but I don’t think it applies to what I’m trying to do. In my case, I want to create clean, short URLs for my YouTube video descriptions – each video links to one product page, but the product URLs are pretty long (sensitive data).
It seems like redirect_canonical() wouldn’t create these custom short links — it only corrects small mistakes in existing URLs, right? Just wanted to confirm I’m understanding it correctly. Let me know if I’m missing something!
Hello,
Apologies for the confusion.
Yes, you can create redirects for that scenario and use them on your YouTube description.
If you have a product base permalink on your URL, the structure would be like this:
Source: product/groove Type: Exact Destination: https://mydomain.com/product/bouncy-rap-beat-dababy-type-instrumental-groove/
Here’s a guide on how to create redirects in Rank Math:
https://rankmath.com/kb/how-to-create-a-redirection/Looking forward to helping you.
Hey, thanks for the clarification!
I’ll set up the redirects in Rank Math as you suggested. Just to make sure I’m doing this correctly — should I use a 301 or 302 redirect for this setup?
I want the short URLs, like /product/groove, to point to the full product pages, but I’m wondering how this affects long-term SEO. Will these source pages, the short links, be indexed by Google, or is there a way to prevent that?
Also, is there any risk of these redirects causing SEO issues over time, like confusing search engines about which URL to rank?
Looking forward to your advice!
Hello,
For your setup, if the short URLs (like /product/groove) are intended to permanently point to the full product pages, you should use a 301 redirect. This type of redirect signals to search engines that the old URL has permanently moved to the new URL, allowing you to transfer link equity and maintain SEO value.
On the other hand, if the short URLs are only temporarily pointing to the full product pages, then a 302 redirect would be appropriate. However, since you mentioned wanting to ensure long-term SEO benefits, a 301 redirect is likely the better choice.
Regarding indexing, when you set up a 301 redirect, search engines will update their indexes to point to the new URL, meaning the short URLs will not be indexed as they will be redirected. If you want to prevent indexing of the short URLs altogether, you can set them as noindex before setting up the redirect. This tells search engines not to index those pages.
As for potential SEO issues over time, using redirects correctly (especially 301s) generally does not cause problems. However, it’s important to monitor your redirects and ensure they are functioning properly. Too many redirects or incorrect implementations can lead to issues like redirect chains or loops, which can negatively impact SEO. Regularly check your site’s performance and make adjustments as necessary.
If you still have any questions, just reply and we will be more than happy to clarify any doubts you might have.
Regarding indexing, when you set up a 301 redirect, search engines will update their indexes to point to the new URL, meaning the short URLs will not be indexed as they will be redirected.
In my case, since I’m creating new short product URLs as the source URL, there shouldn’t be a problem at all?
The destination URL is the one I want to keep indexed and ranked on Google(and they are ranking already), so the short URLs I create with 301 redirects won’t cause any issues. Am I right?
I want to be certain about it because it can be really problematic in the future if I mess this up.
If you want to prevent indexing of the short URLs altogether, you can set them as noindex before setting up the redirect. This tells search engines not to index those pages
How to set these 301 up as nofollow? Is there any option in RankMath settings?
Thank you!
Hello,
Thank you for your patience.
The destination URL is the one I want to keep indexed and ranked on Google(and they are ranking already), so the short URLs I create with 301 redirects won’t cause any issues. Am I right?
Yes, they won’t cause issues on your long URLs that are already indexed.
Apologies for the inconvenience, but this is incorrect:
If you want to prevent indexing of the short URLs altogether, you can set them as noindex before setting up the redirect. This tells search engines not to index those pages
If a URL is already redirected, then its meta and robots meta tags are not readable anymore by search engines, as their purpose is only to be redirected, and no actual page is shown.
However, if you’re referring to the
rel="nofollow"
attribute on your links, then you can find the option to nofollow via the link control optionHere’s a link for more information:
https://rankmath.com/kb/link-controls/Looking forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
- Go to Rank Math SEO → Dashboard and enable the Redirections module.
The ticket ‘How to set up redirects from YouTube descriptions?’ is closed to new replies.