How to Redirect IP Address to Domain (Apache and Nginx)

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 142

  • @samabad95
    @samabad95 3 роки тому +6

    I watched your email server video and now this! You have earned my subscribe! I have been all over youtube trying to figure out how to set this up but I didn't know how to word it! Thank you so much!

  • @golammuktadir4355
    @golammuktadir4355 2 роки тому +2

    Thanks a lot ! both server solution in one place

  • @datamais
    @datamais 9 місяців тому +1

    Exactly what i nedded

  • @salexkorsan8790
    @salexkorsan8790 2 роки тому +1

    Brother i have a VPS Server,
    i don't want to install Server Panel, so Should i Do Same Like This ??? for adding Domain.!

  • @brucejongwe4781
    @brucejongwe4781 2 роки тому +2

    Thank you very much Sir. How do I do it for an IP address with a port number

  • @CalpachinoMrcroner
    @CalpachinoMrcroner Рік тому

    Thank you, it worked for me!

  • @hprompt166
    @hprompt166 Місяць тому

    hi there,
    I have a new domain and I run opnsense firewall.
    how do I access my opnsense using the domain name and not the lan ip address for opensense?
    thanks
    hprompt

  • @susantosusanto7607
    @susantosusanto7607 2 роки тому +5

    hi tony, how about the opposite. when i enter a domain name, it redirect to ip domain?

    • @robert-gq5th
      @robert-gq5th Місяць тому

      Why would you ever want that

  • @M2KEntertainment
    @M2KEntertainment Місяць тому +1

    Did not work for me, I can still access my site via the IP address

    • @maskhoped
      @maskhoped 16 днів тому

      It's been 4 weeks, have you found a solution?
      Edit :
      have you found a solution with apache2?
      Or does it have to work with both, namely Nginx and Apache2?
      I use kali linux btw

    • @maskhoped
      @maskhoped 16 днів тому

      It's been 4 weeks, have you found a solution? with apache2

    • @M2KEntertainment
      @M2KEntertainment 16 днів тому

      @@maskhoped Still not working.

  • @chung_myung.
    @chung_myung. 3 роки тому +1

    Sir, tq so much. 😍.
    This will be helpful for my new project .

  • @emricsanjuan4028
    @emricsanjuan4028 Рік тому

    as sysadd what is main factor to study that sir, thnx to all your videos

  • @bitcoinlitcoindogecoinethb9796
    @bitcoinlitcoindogecoinethb9796 2 роки тому

    Hello dear boss , can it help in RDNS or PTR for redirect ip to domain if we configure this on apache ???please reply because I m facing some problems for RDNS or PTR

  • @flodvx
    @flodvx Рік тому

    Does redirecting the ip to the DomainName lead to a penalty (duplicate content) in the sight of Google ?

  • @devopsbd
    @devopsbd Місяць тому

    Great one

  • @riyaone
    @riyaone 3 роки тому +1

    Hi Tony, How to restrict access to IP address in Apache ??
    I dont want someone to access the website by entering the IP address..
    And I'm using Cloudflare..
    I couldn't find how to restrict access to IP address..
    Please Give me a solutions...

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      Perhaps something like this serverfault.com/questions/842497/disable-direct-ip-access-in-apache/842524

  • @champfisk5613
    @champfisk5613 Рік тому

    Hey man this doesn’t work for me. I’m able to get to the site via up, but not domain name. I can ssh with domain name though. Apache2 is the server

  • @hongchaolin9066
    @hongchaolin9066 2 роки тому

    Thanks, well works!

  • @ammuvlogs3483
    @ammuvlogs3483 Рік тому

    should we change something in apache conf file?

  • @TribaleroDJ
    @TribaleroDJ 2 роки тому

    Great tutorial, how can i only allow cloudflare to direct ip access?

  • @RigoniJr
    @RigoniJr 2 роки тому

    Hi Tony, very good your videos. Could you teach how we can make two links with two different external ips for a single domain in apache server.

  • @kennyaga3859
    @kennyaga3859 8 місяців тому

    Very nice. Thanks

  • @gopalkothuri2616
    @gopalkothuri2616 Рік тому

    Hii toney for this nginx script we have to buy the domail or we can menction domail in nginx file

  • @chung_myung.
    @chung_myung. 3 роки тому

    Hello sir, I tried this method using local ip and it's working good 🔥.
    Do this method work for public ip also?
    I mean if any other inputs my public static ip do they get redirected as shown?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      Yes, this will work for a public IP (that is a public IP in the video)

  • @aabdi_ent8792
    @aabdi_ent8792 2 роки тому

    im living in bangladesh and when im access any website from Pakistan and its price showing in USD$ why it does not showing in pakistani currency? pls help me out. Thanks.

  • @brandon061033
    @brandon061033 2 роки тому

    Great! But how do you configure/block access with dynamic public address?

    • @TonyTeachesTech
      @TonyTeachesTech  2 роки тому

      That I don't know

    • @brandon061033
      @brandon061033 2 роки тому

      @@TonyTeachesTech Thanks for the reply! Let me clarify. I had a dynamic ip address from my ISP. (DDNS updater has been implemented and will update the name server each time the IP change) My question, how do I implement a similar automation that can update the file setting like in your conf file each time the IP changed?

    • @TonyTeachesTech
      @TonyTeachesTech  2 роки тому

      @@brandon061033 Hi Brandon. I understand what you want to do, but I don't know a solution

  • @kmilovalle
    @kmilovalle 3 роки тому

    My site is currently ranking most of the pages with both Domain & IP Address. How can I stop ranking with my IP?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      If you followed the steps in this video, you have done all you can. Google will eventually see the 301 redirects from IP to domain as it crawls your site. This will take some time... weeks or months even.

  • @eslamsaker1
    @eslamsaker1 3 роки тому

    i tried your steps on google cloud ssh for apache how i cna save things before write wq you said save things ho you do that on ssh?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому +1

      This will help you with the vim text editor ua-cam.com/video/uE4aljoMBeg/v-deo.html

    • @eslamsaker1
      @eslamsaker1 3 роки тому

      @@TonyTeachesTech if you could make video how to migrate wordpress to Google cloud complete including transfer files change things on cloudflare (if my site already pointed to cloud flare what should i dob) make file manger etc

  • @Michael-qi6iq
    @Michael-qi6iq 3 роки тому

    thank u sir, very useful

  • @rec-trick
    @rec-trick 8 місяців тому

    we can use httpc in local with django and apache ?

  • @Syntaxs
    @Syntaxs 3 роки тому

    hey! im switching from VPS to physical. how do i take my domains and point them to my server?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому +1

      In your DNS setting for your domain, change the IP address from your VPS to your physical server

  • @lightningboltx422
    @lightningboltx422 Рік тому

    Hello, when i go to my ip after these steps, it redirects me to an att website indicating it could not find the domain. Why would this be happening?

    • @levanfangani57
      @levanfangani57 4 місяці тому

      Same problem here did you find any solution?

  • @Luukullus
    @Luukullus 2 роки тому

    Thank you :)

  • @salexkorsan8790
    @salexkorsan8790 2 роки тому

    Need help, i want ho, self host my website, for connecting apache2 to domain, dns creation is important for this or not ??

    • @TonyTeachesTech
      @TonyTeachesTech  2 роки тому +1

      Yes you will need DNS configuration to access via domain name

    • @salexkorsan8790
      @salexkorsan8790 2 роки тому

      @@TonyTeachesTech thanks darling

  • @indian3960
    @indian3960 3 роки тому

    Hey tony can I redirect my domain to any other domain...
    Ex: Suppose I want to redirect my domain to my youtube or any other social media channel how would I do that? can I do it from my domain registrar DNS settings?

    • @indian3960
      @indian3960 3 роки тому

      and, thanks for making this video ❤

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому +1

      Hey! I believe you can redirect a domain name at the DNS level, although I don't have much experience with this: support.google.com/domains/answer/6069273?hl=en
      IMO, a better option would be to handle the redirect with the web server.

    • @indian3960
      @indian3960 3 роки тому

      just need a single WP Plugin :)

  • @DigitalHelpWorld
    @DigitalHelpWorld 2 роки тому

    i used the nano instead of vim and is not working for nginx

  • @Yo-vv7iy
    @Yo-vv7iy 2 роки тому

    DId the same but i have DNS probe error. Do you know why ?

  • @randythamrin5976
    @randythamrin5976 3 роки тому

    if I have an Nginx on my pods, can I redirect my IP address to a domain?
    I run my Nginx on pods, but in deploy or install it in Linux but run the image on pods.
    I was trying to reach the file on the pods by using this command
    #kubectl exec -it nginx-xxxxx -- bin/bash
    I can enter, but cannot do vim or nano there.

  • @shahbaaz2958
    @shahbaaz2958 3 роки тому

    Great video. But how do I set up a ip to domain redirect with openlitespeed ?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      You can apply these same settings in the OLS control panel

    • @buroq5783
      @buroq5783 3 роки тому +1

      @@TonyTeachesTech Where is the folder of OLS? None under /etc

  • @mirzadaniyyaloffical3916
    @mirzadaniyyaloffical3916 Рік тому

    awesome

  • @ismailakgun97
    @ismailakgun97 6 місяців тому

    bro do a video on windows server with xamp :/

  • @adr130590
    @adr130590 3 роки тому

    Hi, do I need to set a static ip in my router or modem ?

  • @Shamim_BD
    @Shamim_BD 3 роки тому +1

    How can I find my default config file in Apache?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      Usually at /etc/apache2/sites-available/

    • @Shamim_BD
      @Shamim_BD 3 роки тому

      @@TonyTeachesTech was wondeing if you could make a video for Bitnami users!

  • @nischalraman4826
    @nischalraman4826 Рік тому

    I need is that website should not be accessed via an IP in apache

  • @wpdas4122
    @wpdas4122 3 роки тому

    Thank you 👍

  • @carsonherman8120
    @carsonherman8120 3 роки тому +2

    how did you add those directory lines in apache?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому +1

      What do you mean?

    • @thathappyguy152
      @thathappyguy152 2 роки тому

      @@TonyTeachesTech I feel like they may be referring to 3:15

    • @TonyTeachesTech
      @TonyTeachesTech  2 роки тому +1

      @@thathappyguy152 Oh I just pasted them from my clipboard. Perhaps you're wondering how to use vim? See this video here ua-cam.com/video/uE4aljoMBeg/v-deo.html

  • @sokhakho7154
    @sokhakho7154 2 роки тому

    hi tony can you show how to config nginx with .dev domain?

    • @TonyTeachesTech
      @TonyTeachesTech  2 роки тому

      This video will help you with that ua-cam.com/video/QcNBLSSn8Vg/v-deo.html

  • @Astronaut_Sanjana
    @Astronaut_Sanjana 2 роки тому

    If the server is on pvt ip n public ip routed to it then how do u do it?

  • @Jerry-e7p
    @Jerry-e7p 3 роки тому

    Thank you~~

  • @andyandcallie
    @andyandcallie 3 роки тому +4

    Waaaay over my head. I need software to get rid of nginx.

  • @imthiyasvm311
    @imthiyasvm311 Рік тому

    how to redirect aws wordpress lightsail static IP to doamin

  • @KeithRainz
    @KeithRainz 3 роки тому

    what about in litespeed?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      Although I haven't personally tested it, LiteSpeed supports .htaccess so you can probably use the Apache method

  • @karlomarkovic3777
    @karlomarkovic3777 3 роки тому

    Is it the same for a raspberry pi?

  • @THEROBINKEVIN
    @THEROBINKEVIN 3 роки тому

    Wow 🙏

  • @TripiHJFC
    @TripiHJFC 3 роки тому

    It’s work in Linux too?

    • @freddelarsson4434
      @freddelarsson4434 3 роки тому

      He's doing it in a linux dist. via a VM.

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      Yes, this will work on Apache and Nginx running on a Linux system

  • @rafi_45
    @rafi_45 3 роки тому

    can I use this for redirect from http to https in wordpress?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      No, but this will help you ua-cam.com/video/gc1MhsJvuRg/v-deo.html

  • @aashayamballi
    @aashayamballi 3 роки тому

    Thank you

  • @oinkchan1620
    @oinkchan1620 3 роки тому

    can i add ssl certification on redirected domain ?

  • @nikolas8741
    @nikolas8741 3 роки тому

    Hello? I got a question you don't mind if people know your IP?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому +1

      An IP address for a website is public information. Every domain name maps directly to an IP address and is necessary information for users to be able to view your site. So no I don't mind in this case

    • @franciscobrunodias7526
      @franciscobrunodias7526 3 роки тому

      To know some site IP address, just run 'ping somesite.com' and it will return some information about the connection and the IP of somesite.com

    • @gamingshortshisterical
      @gamingshortshisterical 3 роки тому

      @@TonyTeachesTech he was talking about your home IP

  • @mortysmith2192
    @mortysmith2192 4 місяці тому

    does not work for me unfortunately

  • @MansoorBarri
    @MansoorBarri 3 роки тому

    I am getting the '500 internal server error' even tho i have copied exactly what you did

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      Check your logs /var/log/...

    • @MansoorBarri
      @MansoorBarri 3 роки тому

      @@TonyTeachesTech the problem was that i didn't had my ipv6 as DNS record. now its working

  • @MotebangLekhooana
    @MotebangLekhooana 8 місяців тому

    I'm getting an error " redirected you too many times.
    Try deleting your cookies.
    ERR_TOO_MANY_REDIRECTS"

  • @zainulabideen_1
    @zainulabideen_1 Рік тому

    thanks

  • @ksubrahmanyam7747
    @ksubrahmanyam7747 2 роки тому

    how to open same in angular

  • @augus255
    @augus255 8 місяців тому

    not working in my case

  • @randomdamian
    @randomdamian Рік тому

    Doesn't work idk wtf the issue is

  • @pankajbhattarai7210
    @pankajbhattarai7210 2 роки тому

    How to redirect ip:port to domain in nginx?

  • @Istenostor
    @Istenostor 3 роки тому

    Why can it be nessecary?

    • @TonyTeachesTech
      @TonyTeachesTech  3 роки тому

      I got a few requests to make this video from commenters. Not sure how practical this is

  • @rahmanstale
    @rahmanstale 2 роки тому

    How to do that in iis

  • @metooidk
    @metooidk 3 роки тому

    but im host on other port.

  • @a99986
    @a99986 Рік тому

    4:24

  • @dom3rry764
    @dom3rry764 3 роки тому

    not working

  • @johnnygotti1568
    @johnnygotti1568 Рік тому

    Tried it, got banned for fraudulent activity. 0/10
    JK nice video. The fraud is probably because I put the wrong IP in nginx

  • @Berlinnitro19888
    @Berlinnitro19888 9 місяців тому +1

    script find real ip adress