title: Site DNS misconfiguration
body: <p>So lets say that  I have a site (wordpress installation)hosted at  <code>site.hoster.com</code> and a Domain that I purchased that is <code>example.com</code>
  How can I redirect the user from example.com to site.hoster.com without changing the URL.
  I have a added a CNAME Record but the site's url is changing when i try to enter <code>example.com</code>.
   I have tried a bunch of solutions found here on stackoverflow but I can't get it to work.
  The site is an apache virtual host.
  I have added ServerAlias in configuration of the Apache virtual host but it does not work.
  Here is the .htaccess file of the site
  `</p>
  
  <pre><code># BEGIN WordPress
  # The directives (lines) between `BEGIN WordPress` and `END WordPress` are
  # dynamically generated, and should only be modified via WordPress filters.
  # Any changes to the directives between these markers will be overwritten.
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  
  
  &lt;/IfModule&gt;
  
  # END WordPress
  
  # BEGIN ShortPixelWebp
  # The directives (lines) between `BEGIN ShortPixelWebp` and `END ShortPixelWebp` are
  # dynamically generated, and should only be modified via WordPress filters.
  # Any changes to the directives between these markers will be overwritten.
  
  # END ShortPixelWebp
  </code></pre>
  
  <p>PS : I have tried the .htaccess 301 redirect method with varius implementations but it still does not work.</p>
  
  <p>EDIT: Forgot to mention that there is an A record pointing to www CNAME record which point  site.hoster.com </p>
  
  <p>Thanks in advance.</p>