User Tools

Site Tools


Sidebar

admin_menu:addons:geographic_navigation:sub_domains:start

Sub Domains

This page controls whether sub-domains are used by the Geographic Navigation Addon.

Settings

You will find the following settings and buttons on this page in the admin panel.

Sub Domain Usage

Whether to use sub-domains or not for the geographic location URL's.

Not Used

Do not use sub-domains at all. You will not be able to add or edit sub-domains for any of the geographic locations, and it will use cookies to determine what geographic location to display based on what location the user has navigated to.

Configure, but Not Enabled

This option will allow you to edit sub-domain for each geographic location. It will still not be enabled however, so it will still use cookies to determine what geographic location to display based on what location the user has navigated to.

Enabled

This option specifies that use of sub-domain for locations is turned on, and any configured sub-domains will be used for links in Geographic Navigation. Any location that has a sub-domain configured for it, will use that sub-domain to browse listings for that location. If a geographic location does not have a subdomain configured, it will use cookies to determine what geographic location to display based on what location the user has navigated to.

Force full sub-domain for listings?

Setting added in version 7.4.01), previous versions will not have this option.

This check-box will become available when Sub Domain Usage is set to enabled.

If this option is checked, when a visitor goes to a specific listing, it will make sure the sub-domain matches the region for that listing, using a 301 redirect. This can help with SEO as it removes any duplicate content that may happen otherwise.

In addition, if the SEO addon is enabled, the SEO addon will include the full subdomain in all re-written links for individual listings. This applies to everywhere that the SEO addon would normally re-write the URL, including the RSS feed.

<tip c w>Warning: Turning this on will make the visitor automatically select a listing's full region when they view a listing. This may not be expected by the visitor, if for instance, they are browsing listings at the top level, click on a listing. After that point, any pages they go to will be filtered by the region set for the listing.

Because of this behavior, we only recommend turning this option on for sites that are primarily "region based" where your visitors will typically want to only view listings "close to them".</tip>

Sub Domain Settings

If the Sub Domain Usage setting is set to anything besides Not Used, you will be able to configure what sub-domain is used for each geographic navigation region, on the admin page Geographic Setup > Regions, by editing the unique name for each region. When viewing regions on that page, just click Edit for any of the regions to edit the unique name (used for the subdomain).

Auto-Set Subdomains

Clicking on this button will automatically set the "unique name" which is used for the sub-domain, for every geographic region in every level. It will also make use of sub-sub domains for deeper regions, for example the sub-domain for United States would be united-states.example.com, for Alabama, US it would be alabama.united-states.example.com.

If multiple locations would have the same generated subdomain, it would only automatically set the subdomain for the first duplicate, not the rest, since for the system to work the sub-domain for each location must be unique. This is not common since it uses sub-sub domains as mentioned above to ensure less chances of having duplicates.

Clear All Subdomains

This button will clear all unique names (subdomains) for all regions in the system. This is handy if you want to start over and want a way to keep track of which ones you have already changed and which ones you have not.

Instructions for Using Sub Domains

You will need to set up a wild-card sub domain in your DNS configuration. How this is accomplished, will be different for every DNS or hosting company out there. The general principle is to set up the sub-domain * to point to the same IP and same "document root" as your main domain does.

While you are waiting for the changes to propagate, you can set the Sub Domain Usage setting to Configure, but Not Enabled, and start configuring the sub-domains for your geographic locations. Just be sure not to enable sub-domains until the wildcard DNS entry has propagated, which you can tell by attempting to visit a sub-domain on your site.

<tip c n>Note: Using Sub-Domains requires that you configure your DNS properly using the instructions on this page. If you are not sure how to do this, you will need to contact the DNS that manages your domain name, in most cases this will be your hosting company. Setting up your DNS is not included in the installation service we provide, and sub-domain problems are beyond the scope of support we offer. We can usually tell you what is wrong and what needs to be changed, but support cannot do the configurations for you.</tip>

  • DO Technically speaking, configure an "A Name Record" for a wildcard sub-domain2), which goes to the exact same IP as your main A-Name record does. A "CNAME record" will work just as well, as long as it goes to your main domain name.
  • DO Once you have configured your wildcard sub-domain, wait until the changes take effect before attempting to use sub-domains in the software. Due to how it works, DNS changes can sometimes take up to a day to propagate, just like it did when you first purchased your domain name.
  • Do NOT Make the sub-domain use a different document root (a different folder). For example, if you go to example.com it should use the same folder and files as any sub-domain like test.example.com.
  • Do NOT create a different installation for every single sub-domain.
  • Do NOT Create what is sometimes called "Masked Domain", a "Domain Re-direct", or a "parked domain name".
  • Do NOT manually configure every single sub-domain for all of the different locations. While this will technically work if you do it correctly, why would you want to configure 50 sub-domains, 100 sub-domains, or even more, when you could just set up a single wild-card subdomain that does it for you? See the info above for instructions on how to do this, or contact your DNS to have them set it up for you.

Pages in SSL Mode

When using sub-domains, the sub-domain is removed when switching over to a page that uses SSL mode3), for example during the listing placement process. This is because typically SSL certificates will only work on the main domain name, not sub-domains. After the user returns to normal mode, the user can re-select the geographic navigation location to continue filtering by that location.

If NOT using sub-domains, it uses a cookie to remember what location is currently selected, so switching to SSL mode is not a problem.

1)
See bug 1014
2)
For example, if your main domain name was example.com, the wildcard sub-domain would be *.example.com
3)
using https:// at beginning of URL
admin_menu/addons/geographic_navigation/sub_domains/start.txt · Last modified: 2014/09/25 16:55 (external edit)