• Resolved mpage

    (@mpage)


    I have a website running with a couple different domain names all pointing to the root, the main one being http://www.builtbymike.ca. I have a third domain (www.mikeonsite.ca) that I would like to point to a specific page of my wordpress site. Essentially http://www.mikeonsite.ca is specifically for my home service business and would therefore like the landing page to be different than my B2B portion of the site. Thus far I have created “site aliases” pointing to “/html” which is the root of my site. I would be able to point my new domain to “/html/this_folder” however wordpress obviously doesn’t actually create separate folders for the pages, despite it appearing that way in the address bar.

    Would anyone know how I can get a specific page inside it’s own folder within my site such that I can point the new domain to “/html/this_folder” and have it see the page there?

    Thanks in advance for the assistance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Mike,

    First, let me make sure I understand what you want to do. When somebody visits your site at the root domain, domain.com you’d like to redirect them to: domain2.com/folder/page. Is that right?

    If your hosting account uses cPanel you can just setup a redirect for domain.com, as explained here in the cPanel documentation: https://documentation.cpanel.net/display/ALD/Redirects. What this does is modify your .htaccess file for domain.com by adding the following to the end of the file:

    RewriteCond %{HTTP_HOST} ^domain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$
    RewriteRule ^/?$ "http\:\/\/domain2\.com\/index\.php\/foler\/page\/" [R=301,L]

    I hope this helps!

    Thread Starter mpage

    (@mpage)

    Thanks for the quick reply evahost.

    You’re close, but not quite what I was looking for I don’t think. I’ll try to be more clear.

    Right now I have http://www.builtbymike.ca as my main site which in itself is actually an alias pointing to /html where my main page is hosted. I should back this up. http://www.supercool.org is the main site (DNS) and builtbymike.ca is the alias pointing to that.

    What I am looking to accomplish is have my new domain http://www.mikeonsite.ca point to a specific wordpress page (http://www.builtbymike.ca/mike-onsite-home-computer-service/) as an alias so that when you go to http://www.mikeonsite.ca you are actually seeing http://www.builtbymike.ca/mike-onsite-home-computer-service/ but have http://www.mikeonsite.ca in your address bar. Now, if this were an actual folder I could create http://www.mikeonsite.ca as an alias to “/html/mike-onsite-home-computer-service” and all would be well I think. But, “/mike-onsite-home-computer-service” isn’t actually a folder, despite it appearing that way.

    One option I might have is to create a separate folder under the root of my website like “/html/mikeonsite/” but I’m not sure if it’s possible to get a file in there, such as index.php, that would be the same as the wordpress page located at http://www.builtbymike.ca/mike-onsite-home-computer-service/.

    I hope this is a little more clear. Thanks again for your assistance!

    Hi Mike,

    Thanks for clarifying. There are ways to do what you are saying (show the content on one site while maintaining a different url in the browser bar) but Google isn’t going to like any of them. I would ask you to consider if the content in the browser bar is as important as directing your audience to the desired “site content.” If not, proceed with a redirect. If it is, then maybe you should consider cloning the content onto http://mikeonsite.ca to avoid any frame redirect shenanigans. By cloning, I mean do another WordPress site at http://mikeonsite.ca. I hope that helps!

    Thread Starter mpage

    (@mpage)

    Thanks again for the speedy reply.

    So, what you’re saying is that google doesn’t like having domain names point to sub folders of a site?

    Would you be able to recommend the best course of action for me?

    Is it possible then to have http://www.mikeonsite.ca point to http://www.builtbymike.ca/mike-onsite-home-computer-service/, even if it changes the address in the address bar. But, I would like it such that they only have to type in http://www.mikeonsite.ca and not http://www.mikeonsite.ca/mike-onsite-home-computer-service/. Also, is this possible without offending Google?

    Thanks again!

    Hi Mike,

    You’re welcome! What Google doesn’t like is visitors going to a domain and the site trying to show them content from another site (without the redirect being obvious in the address bar).

    You can absolutely setup your redirect from the root domain http://www.mikeonsite.ca to a specific page: http://www.builtbymike.ca/mike-onsite-home-computer-service/. That means no extra typing…just visit http://www.mikeonsite.ca and get redirected to: http://www.mikeonsite.ca/mike-onsite-home-computer-service/ Just follow the directions in my original reply…that will do it. Do you have cPanel? That’s the easiest way to do it. You can also achieve the same thing by editing the .htaccess file directly, this can be a bit trickier. I hope this helps!

    Thread Starter mpage

    (@mpage)

    I got it! Thanks for all the help.

    For future reference, for anyone that is also looking for something like this, I went with evahost’s suggestion with the htaccess file.

    What I ended up doing is creating a directory in my /html/ folder called mikeonsite. Within that directory I created an htaccess file. I didn’t test the one evahost provided but used an htaccess file generator (google them) which gave me:
    Options +FollowSymlinks
    RewriteEngine on
    rewriterule ^(.*)$ http://www.builtbymike.ca/mike-onsite-home-computer-service/$1 [r=301,nc]

    My domain name, http://www.mikeonsite.ca has an alias pointing to /html/mikeonsite/ and from there the htaccess file redirects to http://www.builtbymike.ca/mike-onsite-home-computer-service/.

    This isn’t the perfect solution for me as it would be nice for the address not to change in the address bar to not confuse people. But, this accomplishes what I am looking for.

    Thanks again for all the help evahost!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘DNS alias to specific wordpress page’ is closed to new replies.