简体   繁体   中英

How to point domain to subdomain and index it

I have a domain: www.example.com. I create a subdomain like: subdomain.example.com. When i go to that domain, i get what i want, and land on the subdomain uri.

Now the issue: i want to point www.mysite.com to subdomain.example.com and have it indexed by google. I can do this with a redirect, but the new site won't be indexed by google. I know that it is possible with .htaccess, im i right?

If anyone can help me out or point me into the right direction, i would be very pleased :)

From your description, I take that you have

  • A primary site: subdomain.example.com
  • A secondary site: www.mysite.com (the new site that you want to point to your primary site)

Do the following steps:

  1. Go the Domain Control Panel site of your Primary Domain Register and find the Canonical domain name for subdomain.example.com
  2. Go the Domain Control Panel site of your Secondary Domain Register and add a CNAME record pointing to your primary site's Canonical domain name .

You may have to wait for a few minutes for the changes to take effect.

Note : Your primary domain register may require other changes to your secondary domain records for this to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM