2nd Url to Moodle - does ist work?

2nd Url to Moodle - does ist work?

by Stefan Franz -
Number of replies: 1

Hello, i plan a new domain for my moodle instance. Can i switch the new domain (2nd) additionally to my actuall domain to moodle or does it not work?
I want that my moodle instance is reachable with the old and the new url, but i know in the config.php is the url standing. 
How can i do it best?

Average of ratings: -
In reply to Stefan Franz

Re: 2nd Url to Moodle - does ist work?

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

A Moodle site can only have one URL and this must be set in config.php.

Sometimes people use code in config.php to allow multiple domains. This is not supported and causes unexpected problems.

To change an existing site's URL change $CFG->wwwroot and make any required changes to your web server configuration. The Search and Replace Tool can be used to change any absolute links in the database. Moodle itself does not create these, so this is only needed if these have been added by admins or teachers.

Average of ratings: Useful (2)