6

To start, I've never really found a hard and fast "best" answer here in terms of which setup will help you the most with Google. I've gone both routes and been able to get sites ranking in Google either way. You can be penalized for keyword stuffing (and other reasons) no matter what direction you go. Now, that said, in general, if you are looking at what ...


5

The subdomain is certainly the easiest option since you are wanting to host the site on another server. The reason for this is that a hostname can only ever resolve to a single location. If you are worried about SEO from the changed URLs, you could perhaps consider a redirect to the subdomain instead. However, since you are specifically looking to avoid the ...


4

Is it possible to change my DNS records (or otherwise) in such a way that a sub-domain subdomain.example.com will point to example.com/somepage. Not by changing DNS records. A records point to IP addresses. CNAME records point to another host. Neither can point to a URL or URI like: example.com/somepage. However, some DNS providers (like domain registrars) ...


4

As @Mike has already stated in comments, /public should be your DOCUMENT_ROOT and /includes should be entirely outside of your publicly viewable files, otherwise you are not really practising what you have been taught, to "separate publicly viewed webpages from included files and other, more sensitive information." Your files that you request via AJAX (...


3

If all you are doing is moving the files on your file system to another location but want to keep the same URL structure, rather than setting up URL Rewrite rules you can change the physical path of your IIS website configuration. I will make the following assumptions: You are running website "mydomain.edu" from a physical location such as C:\inetpub\...


3

Subdomains do make it a little clearer for users which part of the site they're on (apart from breadcrumbs). For example, compare: answers.example.com with: example.com/answers/ With Google, you won't see any advantage in SEO with one over the other as of late. See this for more about that: Subdomains vs. subdirectories for SEO: No SERP benefits for ...


3

You don't need the asterisk(*) after www. <Directory /var/www/> Options -Indexes FollowSymLinks MultiViews AllowOverride none Order allow,deny Allow from all </Directory> I'm not a huge fan of allowing indexes, so I disabled those and removed the asterisks. The above will deny indexes and grant allow access to any sub-directory ...


3

If you want something to be accessible publicly on the web, you should put it in the public_html folder. You can create folders within public_html as well. There is no functionality in cPanel for publicly browsing files outside of public_html. That is a security feature. Many items in the root folder should not be public. There are passwords stored ...


3

I referenced all assets in the html with ../img/, ../css/, ../js/ paths. These are client-side URL-paths; not server-side filesystem-paths. If the browser is currently at https://subdomain.example.com/ then a URL such as ../img/myimage.jpg cannot be resolved as intended from a client-side request. Since the browser cannot "go up" another directory ...


3

Maybe something like: RewriteEngine On RewriteRule ^(example)/(\d+)/([\w-]+)/(static/1\.html)$ /$3/$1/$2/$4 [R=302,L] This externally "redirects" a URL of the form /example/{dynamic_id}/{dynamic_name}/static/1.html to /{dynamic_name}/example/{dynamic_id}/static/1.html. I'm assuming that {dynamic_id} consists of only digits and {dynamic_name} is ...


2

Keywords in the URL is a ranking factor but not a big one. So in your example there would be a slight difference in rankings for relevant searches containing the words "blog" and "releases". "Releases" is probably more semantic so that probably would be more advisable but it's not going to make a huge difference either way.


2

I am going to assume you mean that any request for example.com/page.html outputs the content of the file from websitedirectory/page.html. If it was "redirected" then the browser would show the subfolder in the URL. In your case, there is no effect on SEO. Search engines will see the same URLs you see in your browser and won't know about the subdirectory ...


2

You have a few options. A 301 redirect, or 404 not found, 410 gone, or block access using robots.txt. Each option depends upon the situation. If you have links to the sub-domain, then a 301 redirect is a temporary solution to maintain any value of that link. If you are not concerned about links to the sub-domain, then the following options may be better. I ...


2

should those sub-directories be named the same way you would use the ccTLD? According to the Google Webmaster Tools on Multi-regional and multilingual sites under "URL structures" for subdirectories, you can use gTLDs as a subdirectory, however, as Google states here in regards specifying which URLs to use for multilingual regions: Do not specify a ...


2

Yes, folders can be named and targeted the same way that subdomains can be. You can add folders to Google Webmaster Tools and set the targeting there for each folder. The only drawback to folders compared to subdomains is that you can't move the hosting into the country being targeted. Geographic location of the server can be an important signal to ...


2

There will be no difference for SEO to choose one or the other approach for your URLs. However, I think it will be better to choose this schema because it seems logical to me: mydomain.com/companies (main category explore section) mydomain.com/companies/nike Indeed, the category page refers to a list of companies and a detail page for Nike is just a ...


2

Subdomains are more difficult to setup: you have to create a DNS record for each subdomain. If you wish to switch to HTTPS while using subdomains, you have to buy a wildcard SSL certificate which 10 times more expensive than a regular domain certificate. With subfolders, since your domain don't change you just need a SSL certificate that will cover www and ...


2

This is not possible unfortunately. Cookies are attached at the domain level. The way many sites, including the entire stack exchange network, deal with this is by having static content stored on a completely separate domain name, ie: something.stackexchange.com has all the static content stored on cdn.sstatic.net. As you can see it is not simply in a ...


2

It is very easy to configure a server to hide file extensions by default. On an Apache server for example, it can be done like this: SOURCE RewriteEngine On # Unless directory, remove trailing slash RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/$ http://example.com/folder/$1 [R=301,L] # Redirect external .php requests to extensionless url ...


2

That WordPress plugin should be able to handle this, but otherwise it's just a one-liner in .htaccess (which will also be more efficient): RewriteRule ^shop/ /products/ [R=302,L] The above directive should go after the RewriteEngine and RewriteBase directives but before any other WordPress stuff. This redirects /shop/<anything> to /products/. ...


2

Yes there are some sites that still do use the subdirectory name for different languages. Most have moved away from that method and are using domain names such as example.es instead of es.example.com. To answer your question. http://www.apple.com/es https://www.amazon.es/ http://www.ebay.es/ Pros and cons of multilingual URL approaches Now let’s take a ...


2

Have you tried using the full URL? <script type="text/javascript" src="http:/mysite.com/lib/mylib.js"></script> or even <script type="text/javascript" src="/lib/mylib.js"></script> One of the best ways to find your own answer is to experiment.


2

wouldn't it be under /var/www/public_html/www.example.com or would it be /var/www/public_html/example This is a completely personal call as it has (in all generic cases) absolutely no technical consequences, both for the anchor path you choose, and how you configure things in it. So it is up to the administrator to decide what to do. Some considerations ...


2

Perhaps this is just a misunderstanding of what is intended. Your blog doesn't have to be in a subdirectory, it can just be a link within wordpress. In fact WOrdPress is set up to do exactly what you want. Dashboard > Settings > Reading you will see you can select the home page and the posts page. It is that simple


2

Not necessarily. I have directories on almost every site I build that have empty index pages to prevent people from poking around. Example: 'localhost/mysite/images/' contains an index.php that will redirect them to 'localhost/mysite/'. It's a silly little thing, but SEO really doesn't need to sort through all of my images. And I certainly wouldn't want to ...


2

Google recommends to “Consider organizing your content so that URLs are constructed logically”. So, for example, having such a URL example.com/news/astronomy/we-are-not-alone, for me it would be illogical not to have such pages as example.com/news/astronomy or example.com/news (personally, I quite often delete some parts of the URL to go to the parent ...


2

Is this Wordpress default approach harmless? Absolutely. But the default WP approach is not enough. does the company have to get different domain names like something.gr, something.en, something.ru? No, there isn't any obligation. Any approach is ok if it is matching Google's guidelines. There is nothing unusual in your setup, and nothing, what one ...


2

RewriteRule ^/wis/9-3/1998/(.*)$ /9400/wis/9-3/1998/$1 [L] This won't work in a directory (or .htaccess) context because of the slash prefix on the RewriteRule pattern. In .htaccess only a partial URL-path is matched, which notably does not start with a slash. So, this should be written: RewriteRule ^wis/9-3/1998/(.*) /9400/wis/9-3/1998/$1 [L] (The end $ ...


2

There is a pretty good article on this @ Github. Basically you can set new origin in the sub directory "blog". And you have some other options like submodules and subtrees. See the answer @ Stackoverflow.


2

It is possible and WordPress is set up by default to allow static files. WordPress uses a front controller to have index.php handle all the URLs. But it has an exception for any static file that actually exists. The code WordPress uses in .htaccess to do this is: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /...


Only top voted, non community-wiki answers of a minimum length are eligible