XAMPP is open source web server used to create local server on windows machine. To access your projects you must have used URLs like http://localhost/magento19/ .
Custom domains for XAMPP can be setup to access projects. So that whenever www.example.com is entered in browser it will redirect to http://localhost/magento19/, But your custom domain will appear in the URL bar.

Creating custom domain is important so that you can test or view behavior of the site before it goes live. You can have the exact view of site as it will be shown to public.
Sometimes it is good for solving css, js not found issue.

    Let’s get started

  1. Map your domain to localhost
  2. Open file hostslocated at C:\Windows\System32\Drivers\etc with administrator privileges and add below line.

    It should look like

    Change www.example.com to your desired custom domain.
    You can add as many custom domains you need in this file.

  3. Tell XAMPP about your custom domain
  4. Apache’s virtual host feature allows to point custom domains to project inside c:\xampp\htdocs\ folder.

    Open C:\xampp\apache\conf\extra\httpd-vhosts.conf and add below lines.

    If your localhost has setup to listen on any other port, add your port number in tags.
    e.g. <VirtualHost *:80>

    You can add multiple custom domains for different projects as below.

    Now restart Apache and hit URL. If your project doesn’t starts press ctrl+F5
    custom domain xampp
    Tip for Mage Devs : Don’t forget to change the base url in phpMyAdmin