Wordpress & trailing slash on domain name
-
Hi recently changed my site so it is based on Wordpress, got my preferred domain set in Google webmaster as
but since moving to wordpress my domain is now having a slash put on the end of it like
Most of the links going to my homepage do not have the slash on the end so am I right in thinking I should get rid of the slash from my site so I have one consistent url?
If so any ideas how to banish the slash? Cannot seem to do it through the Wordpress general settings (despite preferred domain being set as www.domain.co.uk !)
Thanks
T
-
Takeshi, that was great thank you
-
Try this:
<code># BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteRule (.+)/$ $1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] IfModule></code>
-
Think it is a HTAccess issue, just opened it up and I have the following, do I just strip out the trailing slash on
RewriteBase /newsite/ or do I have to strip out a few more?
Don't like messing with my hataccess so any help to point me in the right direction would be great!
# BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On RewriteBase /newsite/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /newsite/index.php [L]</ifmodule> # END WordPress
-
Good point!
Just checked and www.domain.co.uk redirects to www.domain.co.uk/
This a htaccess issue perhaps?
-
Does www.domain.co.uk redirect to www.domain.co.uk/ or are they treated as separate pages?
-
Self hosted!
I have set it as www.domain.co.uk in the settings but for some reason it is still showing with the slash when I view the site
-
Are you on self hosted Wordpress or wordpress.com? Usually on self hosted you can edit the URL under general options.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Fundamental things to concentrate on for Domain Authority
I'm looking for the fundamental things to concentrate on when trying to improve my Domain Authority as it is's poor for my area and I want our business to compete with other businesses in our county. We're an automotive company www.chorleygroup.co.uk - we need to compete with other automotive companies in our areas.
On-Page Optimization | | CGroup1230 -
Wordpress 503 errors
We've launched a new website and i'm see a lot of 503 errors when i run Screaming Frog Seo Spider. Does anyone know how to solve this problem? wwww.besteluieraanbiedingen.nl Thanks!
On-Page Optimization | | Happy-SEO1 -
Title Tag and Company Name
Hello everyone! The company I work for has an e-commerce site that needs to be optimized. I am starting from the title tags which are too long and need optimized for specific keywords. Thing is that each title tag contains the specific keywords for the page and the company name. My question is should I keep the company name within the title tags or should I just keep the keywords I target for those pages? How will it affect my rank? Cheers Oscar
On-Page Optimization | | PremioOscar0 -
Should I hide the blog post pages that are automatically built in WordPress?
The pages that are automatically created through WordPress (ex: blog post page 5) are popping up as pages that don't have titles or descriptions. Should I use a branded title and description on those pages or hide them from the search engines? Since it's pulling blog posts to create the pages, keywords are all over the place as well. What's the best course of action? Ex: http://www.blackdogeducation.com/blog/page/2/
On-Page Optimization | | BlackDogStudios0 -
Multiple domains vs single domain vs subdomains ?
I have a client that recently read an article that advised him to break up his website into various URL's that targeted specific products. It was supposed to be a solution to gain footing in an already competitive industry. So rather than company.com with various pages targeting his products, he'd end up having multiple smaller sites: companyClothing.com companyShoes.com Etc. The article stated that by structuring your website this way, you were more likely to gain ranking in Google by targeting these niche markets. I wanted to know if this article was based on any facts. Are there any benefits to creating a new website that targets a specific niche market versus as a section of pages on a main website? I then began looking into structuring each of these product areas into subdomains, but the data out there is not definitive as to how subdomains are viewed by Google and other search engines - more specifically how subdomains benefit (or not!) the primary domain. So, in general, when a business targets many products and services that cover a wide range - what is the best way to structure the delivery of this info: multiple domains, single domain with folders/categories, or subdomains? If single domain with folders/categories are not an option, how do subdomains stack up? Thanks in advance for your help/suggestions!
On-Page Optimization | | dgalassi0 -
5 websites, 1 root domain name: good or bad?
Hi guys, I'm new here, so this might be a basic question to the experts here! So here is my situation: I have 1 "umbrella" website (root domain name) that contains 4 different websites, for a total of 5 different websites. They are related, but we needed to brand each website differently to fit each strategy. Q: I have 23 domain names.. this means I have 23 sub-domain names?
On-Page Optimization | | Jacky_C
Q: Is this practice good or bad for my SEO?
Q: should I analyze each domain name/SD? Here are my 5 websites
RD: furisgreen.com
SD1: furcouncil.com
SD2: furfashions.com
SD3: naffem.com
SD4: beautifullycanadian.com Thank you for your help!!0 -
Exact Match Domains
Hi All Which strategy from below would be best for the purchase of an exact match domain... 1) www.shiny-blue-widgets.com 2) wwwshinybluewidgetsshop.com Wondered if there was much difference in either as I know both have plus and minus points.
On-Page Optimization | | PerchDigital0 -
Include the company/domain name in page titles and urls?
I know this isn't something that I would use site-wide but I'm wondering if it helps or hurts me to use my company name (also my domain name) in pages below the homepage. As an example, let's say I'm Home Depot. In the category pages off the homepage should I use Page names and urls like Home and Garden Supplies or Home and Garden Supplies at Home Depot? Or does it hurt me to reuse my company/domain name on multiple pages?
On-Page Optimization | | kdieruf0