diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php
index bd49422398..cf81df66ba 100644
--- a/app/controllers/api/projects.php
+++ b/app/controllers/api/projects.php
@@ -6,7 +6,6 @@ use Utopia\Exception;
use Utopia\Response;
use Utopia\Validator\ArrayList;
use Utopia\Validator\Boolean;
-use Utopia\Validator\Domain as DomainValidator;
use Utopia\Validator\Text;
use Utopia\Validator\WhiteList;
use Utopia\Validator\URL;
@@ -19,6 +18,7 @@ use Appwrite\Database\Document;
use Appwrite\Database\Validator\UID;
use Appwrite\OpenSSL\OpenSSL;
use Appwrite\Network\Validator\CNAME;
+use Appwrite\Network\Validator\Domain as DomainValidator;
use Cron\CronExpression;
$scopes = include __DIR__.'/../../../app/config/scopes.php';
diff --git a/app/views/console/settings/index.phtml b/app/views/console/settings/index.phtml
index a16812a63e..d4c2c359fe 100644
--- a/app/views/console/settings/index.phtml
+++ b/app/views/console/settings/index.phtml
@@ -361,7 +361,7 @@ $customDomainsTarget = $this->getParam('customDomainsTarget', false);
-
+
diff --git a/src/Appwrite/Network/Validator/Domain.php b/src/Appwrite/Network/Validator/Domain.php
new file mode 100644
index 0000000000..848e338d60
--- /dev/null
+++ b/src/Appwrite/Network/Validator/Domain.php
@@ -0,0 +1,54 @@
+domain = new Domain();
+ }
+
+ public function tearDown()
+ {
+ $this->domain = null;
+ }
+
+ public function testIsValid()
+ {
+ // Assertions
+ $this->assertEquals(true, $this->domain->isValid('example.com'));
+ $this->assertEquals(true, $this->domain->isValid('subdomain.example.com'));
+ $this->assertEquals(true, $this->domain->isValid('subdomain.example-app.com'));
+ $this->assertEquals(true, $this->domain->isValid('subdomain.example_app.com'));
+ $this->assertEquals(true, $this->domain->isValid('subdomain-new.example.com'));
+ $this->assertEquals(true, $this->domain->isValid('subdomain_new.example.com'));
+ $this->assertEquals(true, $this->domain->isValid('localhost'));
+ $this->assertEquals(true, $this->domain->isValid('appwrite.io'));
+ $this->assertEquals(true, $this->domain->isValid('appwrite.org'));
+ $this->assertEquals(true, $this->domain->isValid('appwrite.org'));
+ $this->assertEquals(false, $this->domain->isValid(false));
+ $this->assertEquals(false, $this->domain->isValid('.'));
+ $this->assertEquals(false, $this->domain->isValid('..'));
+ $this->assertEquals(false, $this->domain->isValid(''));
+ $this->assertEquals(false, $this->domain->isValid(['string', 'string']));
+ $this->assertEquals(false, $this->domain->isValid(1));
+ $this->assertEquals(false, $this->domain->isValid(1.2));
+ }
+}
\ No newline at end of file