1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remove site pointing to my A record?

Discussion in 'General Programming Chat' started by samiejg, Apr 19, 2015.

  1. samiejg

    samiejg Senior Member

    Joined:
    Dec 14, 2013
    Messages:
    1,140
    Likes Received:
    71
    I didn't really know where to put this and I feel bad because this is something I should already know.. But I just signed up a new VPS (centos) and they gave me an IP address but it seems someone was already previously using that IP and their crappy domain is still pointing to my IP which is now my new vps and pulling up my content.

    How do I make it so only my own domains can host on my VPS?
     
  2. PitchBlackHat

    PitchBlackHat Registered Member

    Joined:
    Mar 16, 2015
    Messages:
    64
    Likes Received:
    1
    You can't, you don't control the DNS records for a domain you don't own.

    You have 3 options:

    1) Ask your VPS provider to change your IP address
    2) Convince the owner of the domain (or the registrar, assuming it is them who manage the name servers for the domain) to delete this record
    3) Create a virtual rule in Apache to direct traffic coming to your domain to the folder in your VPS that has your content and create a rule to reply to the client with a 404 error if they come to your IP wanting to see ABC.com domain
     
    • Thanks Thanks x 1
  3. m4dm4n

    m4dm4n Regular Member

    Joined:
    Sep 15, 2010
    Messages:
    223
    Likes Received:
    92
    Occupation:
    /dev/full
    Location:
    /dev/urandom
    You should not even care about that, it's not your problem or your provider's problem it's the resposability of the owner of the domain in question
     
  4. samiejg

    samiejg Senior Member

    Joined:
    Dec 14, 2013
    Messages:
    1,140
    Likes Received:
    71
    Yeah, but then it starts causing issues when their site is indexing my content, especially if Google indexes their domain first.

    I ended up just contacting them to get my IP address changed and everything is fine now. I still don't like the idea though that people can just point their domain to my server, or that I even have to bother handling with their website requests at all.

    I always thought that the domains had to be added to the host header before they could take effect.


    @PitchBlackHat - I'll try out #3 maybe! ... Just incase any issues come up in the future....

    Actually! Now that I think about it.. I left a blank html page in the public_html of my VPS. Then added a virtualhost to a newly created folder for my site... I would of thought if anything it would load up the public_html... but doesn't seem to be the case.
     
    Last edited: Apr 20, 2015