It is important to understand that if any URL on the website is changed, it needs to be redirected. Redirection means that when a user opens the old URL, they will be instantly taken to the new one.
Each old URL must be redirected for 2 main reasons:
SEO: Search engines index every page on the website, recording the page URL in their databases. When a page's URL changes, the old URL might still be displayed in search results for some time because search engine databases aren't updated immediately. If an old URL no longer exists, search engines will display it until they detect a 404 error(page not found). Pages that return 404 errors are removed from search results, and the website can be penalized, potentially losing valuable rankings. This also results in a loss of all SEO value that the page had acquired. To avoid this, implementing a 301 redirect transfers the SEO equity of the old page to the new URL, preserving the page's search engine performance.
UX: If an old URL is not redirected, users will encounter a 404 error when trying to access the page through search results or external links (e.g., backlinks still pointing to the old URL). This results in a poor user experience, as users will be unable to access the content they expect. This can lead to frustration and increased bounce rates (users leaving the site immediately), which negatively impacts the overall user experience and can indirectly affect SEO.
There are 2 ways to set redirections for the old URLs:
Below is the detailed process of updating the URL redirects for each of these ways.
There are rules that must be taken into account before updating the redirects on the website. The list of new redirects needs to be checked and updated taking into account already existing redirects according to the rules below.
No circle redirects/no redirect loops
A redirect loop/circle redirect occurs when a URL repeatedly redirects to another URL (or back to itself) in such a way that the browser is stuck in an infinite cycle of redirections without ever reaching the intended page. This happens when the redirect chain is misconfigured, causing the browser to keep following redirects indefinitely. This situation can happen when the old website URL was the same as the URL the Content Editor wants to change the current URL to.
Example:
The above case creates a redirect loop. This kind of loop is not acceptable, it creates an infinite redirect and the user won't be able to get to any page getting an error “ERR_TOO_MANY_REDIRECTS”. This will also cause a negative SEO impact and the website will be penalized. In the above case the first redirect needs to be removed, leaving only the following redirect:
No duplicated/double redirects
As there are a lot of already existing redirects, before adding any new redirects Content Editor must make sure that there are no existing redirects that point to the old URL that needs to be redirected. This case will happen frequently, as the current list of redirects includes the URLs from the old website, which were redirected to the current URLs of the new website. Therefore, if any current page URL is changed, it is likely that the old website URL was previously redirected to it.
Example:
The above case makes a double redirect. The redirects should be revised to the following:
That way, the old website URL and the previous URL of the product are both redirected to the new URL separately, without a double redirect.
Format
Make sure that each redirect follows the correct format:
List of redirects currently published:
Production: https://admin.advacarepharma.org/wp-json/custom/v1/export-redirects
Dev: https://admin.dev.4.advacarepharma.org/wp-json/custom/v1/export-redirects
This method of updating the URL redirects is used when only a few URLs need to be redirected. This method will be applicable for most of the situations, when just several product names have been changed and URLs need to be revised.
The list of the changed URLs should have been prepared in advance by the Content Editors when changes in the content were made. In addition, as mentioned in the “Importing the Content to the Website” section, point 7, the script will print the list of the needed redirects at the end of the process, before deployment starts.
The process of creating the redirects in the plugin one by one is the following:
- Source URL:enter the old URL that needs to be redirected, without the domain (for example, /en/supplements-manufacturer)
- Target URL: enter the destination URL, the URL where the old URL needs to be redirected to (without the domain as well, for example /en/supplements)
- Group: Select the group from the dropdown. For manually added URLs select the group “Redirections”.
Note: every URL MUST be correct. Mistakes in the URLs are not acceptable and will cause serious issues to the website.
At the moment of writing this SOP the process of importing a CSV file to Redirections plugin has not been tested for special cases and scenarios.
The overall process is to create a clean CSV file with desired redirects following the format required by the plugin:
The file prepared for the import must be saved in the following folder in the file server: Z:\Shared drives\Website Projects\AC - advacarepharma.com\Version 4 (2022)\Design Phase\3.SEO\Redirections\Redirections Import
The file name must be clean and contain the date of the creation.
Once the file is prepared, the Content Editor must inform the Marketing Dept. Manager to check the file, make sure the format is correct and run the import for the first time. The new redirects must be imported to dev before production, and checked in dev to make sure everything works as expected. Marketing Dept. Manager can request assistance from the IT Dept. Manager or Development Team if required.
Theme Klb4 v1.2.2 was with by Lauro W. Guedes
Building with Grav flat-file CMS and based on Quark Theme