Category Archives: a-records

Redirect root to subdomain from htaccess file on subdomain server?

We have a website with files on two servers. One server has a subdomain ( The other is just

We have it set up (w/ A-records) so that the domain servers point files with the "home" subdomain to the server with the subdomain "home", and pages with the "www" prefix to the other server.

Now, would it be possible to redirect the homepage to the homepage with a mod_rewrite in the htaccess file on the server with the "home" subdomain? Or, would the mod_rewrite need to be in the "www" server's htaccess file?

A little complicated, I know. I'll try to clarify more if needed. Just wondering if this is possible. Thanks!

Point 2 A Records to IP address, separate folders

I have 2 separate A records pointing to the same IP address: -> IP -> IP

"" currently points to the root public_html folder (where wordpress is installed)

I would like the second, "" to end up in:

public_html/example2folder - (where i have installed magento)

How do I edit the .htaccess file correctly to achieve this? Please help!

force Apache2 to respond only on 1 specific URL and not any other

I have multiple A record for the same server IP address, I mean:

URL            DNS res.

I would like to configure Apache2 so that it works only with URL and not with any other.

I've found the way to give "access denied" on specific URL "" like this :

<VirtualHost *:80>
    DocumentRoot /var/www
    <Directory /var/www/>
            AllowOverride None
            Order deny,allow
            deny from all

Is there a more elegant and efficent way to do the same?

Is there a way to configure Apache to be sure that any other future and undesired new A record, will be rejected by default?

thanks in advance for your help

system SO:      Linux 2.6.32-5-amd64  x86_64 GNU/Linux
Server version: Apache/2.2.16 (Debian)

Answer from when pinging my domain

yesterday I have connected up my new domain (let's call it using an A-Record to my V-Server, let's give him the IP-Adress Now it should be well configured (on the online panel they said it would be done in less than 24h). Then I set up a apache2 vhost with the following content:

<VirtualHost *:80>
    DocumentRoot /var/www/domain/mainpage

<VirtualHost *:80>
    Redirect 301 /

<VirtualHost *:80>
    DocumentRoot /var/www/domain/wiki

<VirtualHost *:80>
    Redirect 301 /

When I now want to browse to, I get a blank page. If I ping it, I get an answer from . Now I thought, this is strange, but when I asked some friends to do the same, they all get the same result.

Looking forward for your answers,


Creating an exception when pointing a domain using A record (Shopify)

I am setting up a Shopify site using a custom domain. However, I have old links on that domain that I don't want to break once I point it to Shopify. I also have old parked domains on top of this domain that I don't want to break.

Shopify instructs you to set up an A record for the domain (so when I go to I see my Shopify store). But I want to set up exceptions such that won't show Shopify, or will allow me to forward to its replacement at Shopify.

An added complication is I also have parked domains on top of my domain that I want to remain pointing to my old server.

Is there such thing as a URI exception to an A record?