How to batch replace old links within the site after changing the domain name or column name, and what should be kept before the change
After changing the domain name or column name, the old links within the site should be processed in the order of 'first reserve, then replace, then redirect, and finally check': The first step is to make a data backup, leaving a copy of the entire content including static files to ensure that you can rollback in case of an error during replacement; the second step is to use a site-wide replacement tool to batch replace the old keywords or old links in the text; the third step is to configure 301 redirects for the old addresses, redirecting the existing references and favorites from outside the site to the new address; the fourth step is to manually check the navigation settings and single-page entry points to confirm that there are no references left outside the replacement scope.
Backup the day of the revision.
Replacement belongs to batch writing, one operation will change a large amount of text, and the cost of failure is not small. The significance of making a backup before modification is to compress the rollback time from
After making a backup, it is also necessary to confirm that the recovery path is available. Knowing where the backup is and how to restore it is more important than the backup itself; if the recovery process has not been verified on the day of the revision, it is as if there is no way out.
What is covered and not covered by the batch replacement
The site-wide replacement tool is responsible for batch replacing keywords or links, the object of which is the text in the content. The following table separates common locations according to whether they will be covered by the replacement tool, making it convenient to arrange item by item:
| Position | Can the replacement tool cover | Solution |
|---|---|---|
| Inline text in the main text and in-site links | Can | Batch replacement from old string to new string |
| Images and attachment addresses in the main text | According to the path writing | First confirm the form of reference, then decide whether to replace the whole string |
| Column address in navigation settings | Not possible | Modify each item in the navigation settings one by one |
| Entry and title of the single page | Not possible | Check each single page one by one |
| Fixed address in the template | Not possible | Edit the AI visual template or manually modify the template |
| Site settings such as watermark, email reminders, etc. | Not possible | Belongs to another type of configuration, check item by item |
The things that are easy to miss are on the right column. The navigation, single page, template, and site settings are not within the range of text replacement, and only one batch replacement will be run, and the footer address in the top menu of the page and the automatic email will still point to the old address.
How to补the redirect of the old address
The replacement of the main text solves how the station itself writes, but not how others enter. The old addresses that have been collected, shared, written into business cards and placed in materials outside the station need to be redirected to the new address through 301 redirect management. When configuring, write according to the corresponding relationship from the old path prefix to the new path. The overall renaming of the column can usually be covered by one prefix rule, and the alias of individual articles that have changed needs to be listed separately.
The static rules also need to be checked synchronously. After the column name is changed, if the old column name is still left in the path segment of the custom static URL, it will appear as a misalignment where the jump is possible but direct access results in a 404 error. On the day of the upgrade, a batch of real addresses were checked: old addresses, new addresses, column homepages, and article pages were tested one after another.
Several places need to be reviewed after the replacement
The review is done in four directions, much faster than reading the entire site:
- Random sampling check: select several articles from the column with the largest amount of changes to confirm that the replacement did not change irrelevant text along with it;
- Keyword and anchor text: The internal anchor text link depends on the keyword setting, and the anchor text pointed to by the column name after the renaming needs to be confirmed again;
- Site map and push: After the address changes, regenerate the site map and do link push for the updated content to make search engines discover the new address as soon as possible;
- Reminders settings: Mail reminders, watermarks, and other independent configurations need to be confirmed one by one, and we do not rely on the replacement tool to process it by the way.
Common questions
Can we skip the backup and directly run batch replacement?It is not recommended. Once batch replacement affects a large amount of text, it is faster and more reliable to recover from a backup than to manually correct it when there is a wrong replacement.
Can the old addresses in the navigation be replaced together?Cannot. The site-wide replacement is for keywords and link content, navigation settings, and single pages are part of the site configuration items, and need to be modified item by item at the corresponding position.
Should the old domain be retained for a period of time?Yes. At least retain the accessible entry of the old domain name within the effective period of the redirect, so that external references can naturally transition, and observe whether there are any concentrated access paths of the old path that have not been covered.
Will the inclusion be worse after changing the address?The key is whether the two things of redirection and site map are done enough: use 301 to redirect the old address to the corresponding new address, and send out the new full list through site map and link push, which can shorten the time to discover the new address.
What if I find that I made a mistake after replacing it?Restoring from the backup before the version update is the fastest way within the controllable range; if only a few entries are wrong, you can also correct them one by one in the background, and at the same time, add this round of new and old strings to the replacement record to avoid making the same mistake in the next round.