canonical or redirecting

canonical or redirecting - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the canonical or redirecting error on your web browser. Problem :


When I have a page with the URI lets say www.example.com/page there might be the possibility that users or links end up sending the user to pages like this: www.example.com//////page?



I could just use a canonical on the page which refers to www.example.com/page, but my fist question is whether a redirection via PHP with:



header ("Location: http://www.example.com/page")



might be more useful. It is definitely more user-friendly, which should be the overall goal.



My second question now is, in case I use the canonical, should I include the canonical tag into the page standard html or should I just put it in there via PHP if the canonical differs from the current page URI?


Solution :

The redirect is the better solution, as it stops the erroneous URLs ever being linked to or shared, and so should help crawl efficiency (i.e., search engines shouldn't have to crawl multiple non-canonical versions of pages, thereby wasting time that could be spent elsewhere on your site).



I'd do your redirects on the server though, if possible. A fairly simple regular expression will catch all manner of undesirable URL variants (e.g., jumbled case, with and without trailing slash, etc.).



You don't need to apply the canonical link element conditionally: it can always be there, regardless of whether the page is being shown on a non-canonical URL or not. Even Google do this.


We hope that this article has helped you resolve the seo, redirects, canonical-url error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=