[Help] Can I change the behaviour of my domain?

YashAkheniya

New member
Aug 8, 2020
11
3
3
I just want to know if I can change my domain record to behave the way I want it to.

Here is my full concept:

Suppose I purchased a domain (mydomain.xyz) from Godaddy and had it hosted by Hostinger.

Now I want my (mydomain.xyz) domain to work as (mydomain.com). I am sorry, but I don't know how to pronounce technically this exact process, but is it possible so that whenever I share a link to my domain (mydomain.xyz), it automatically redirects to mydomain.com? I know I can do it by purchasing another domain and redirecting it, but I just want to learn this routing or something.

If you know about this process, please share your thoughts or resources or articles(if you have). Thanks in advance.

Thank you very much for your valuable time spent reading this thread.
 

Proxybunker

Well-known member
Jan 3, 2021
2,660
1,841
120
codecanyonscripts.com
if you own the domains mydomain.xyz and mydomain.com

then all you need to do is set up a 301 redirect from your domain panel or within the .htaccess
you can use soothing like this
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?:www\.)oldsite\.com$ [NC]
RewriteRule ^http://newsite.com%{REQUEST_URI} [L,R=301]
 
  • Like
Reactions: tuton012

YashAkheniya

New member
Aug 8, 2020
11
3
3
if you own the domains mydomain.xyz and mydomain.com

then all you need to do is set up a 301 redirect from your domain panel or within the .htaccess
you can use soothing like this
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?:www\.)oldsite\.com$ [NC]
RewriteRule ^http://newsite.com%{REQUEST_URI} [L,R=301]
Thanks @Proxybunker for the technic, but as I have mentioned, I don't want to redirect to an actual new domain; I just want to perform with only one domain.
 

Proxybunker

Well-known member
Jan 3, 2021
2,660
1,841
120
codecanyonscripts.com
then your post makes no sense
as you say you want to and I quote
( but is it possible so that whenever I share a link to my domain (mydomain.xyz), it automatically redirects to mydomain.com? )

if you have only purchased the XYZ domain and not the .com the answer is no it can not be done
 

YashAkheniya

New member
Aug 8, 2020
11
3
3
I was just curious because, from what I know, I can change my xampp localhost to a custom domain name (here is a reference link), so I just want to know whether it is possible on hosting or not.
 

Proxybunker

Well-known member
Jan 3, 2021
2,660
1,841
120
codecanyonscripts.com
yes when you are working within the .loc space within your own local environment you can pretty much set any domain you want as its only accessible within your local area network your home router

when you start to take about live domain names or ICANN
there is a lot of security in place to stop users from spoofing domain names so let's say you own
babiato.tech but you want to use babiato.techm

then you will have to buy all the top-level domains that you will need for your domain name for example
babiato.tech.uk
babiato.techm
babiato.org
babiato.tech
and so on

hope that helps
 

YashAkheniya

New member
Aug 8, 2020
11
3
3
Yeah, man, I was going in the wrong direction. Thanks for the response; I really appreciate your method of explanation. 🙌
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu