I have a website (built with MediaWiki 1.33.0 CMS) that contains a robots.txt file.
In this file, there is a line containing the literal domain of this site:
I generally prefer to replace literal domain references with a variable value call it will depend in some way (as the case may be) on the execution in value which corresponds to the domain itself.
An example for a CVV would be a Bash variable substitution.
Many CMSs have a global directive file that usually contains the basic address of the website:
In MediaWiki 1.33.0, this file is:
LocalSettings.php which contains the basic address online 32:
$wgServer = "https://example.com";
How could I call this value with a variable value call in robots.txt?
This will help to avoid confusion and malfunction if the domain of the website is changed. I would not have to manually change the value there too.