Ashley Cameron Design

Ashley Cameron Design

Shop the Creative Design Market

Good morning
Map Vanity Domain

Map a Vanity Domain to a Page or Post on WordPress Website

This post was last updated: Sep 6, 2022
BlogWordPress

About a 1 minute read

"The art of living… is neither careless drifting on the one hand nor fearful clinging to the past on the other. It consists in being sensitive to each moment, in regarding it as utterly new and unique, in having the mind open and wholly receptive."

Alan Watts

This article contains the essential steps for mapping a vanity domain to a post or page on your WordPress site. For example: myvanitydomain.com will show the page/post: yourwebsite.com/vanity/

1) Purchase the domain on your host
2) Assign the domain to the root of your WordPress site where the landing page lives – *if the site is in a directory, assign the domain to the same location as the index.php that points inside the directory

3) Paste in .htaccess above #BEGIN WordPress


1
2
3
4
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^yourvanitydomain.com$ [NC]
RewriteRule ^(.*)$ index.php?page_id=2 [NC,QSA] //Change the id to your page id