Disable Access To Site Pages via Short Link URL – WordPress

This little snippet simply redirect your site into 404 or into your site home-page if your site visitors trying to navigate your site using short link url.

Why this snippet helpful?

– There are few reasons why we can tell this snippet is useful and the most common one is to avoid Google indexing the short link URL instead of the user friendly and that affect site ranking.

Here’s a sample

So if some one trying to access the short url they’re automatically redirected into 404 page or your site home-page.

That’s it happy coding ^_^

by Ryan Sutana